|
15 | 15 | <ImageFile>ethernet-shield.jpg</ImageFile>
|
16 | 16 |
|
17 | 17 | <Properties>
|
18 |
| - <Property id="ETH_LIBRARY_TYPE" name="Ethernet library type" desc="Choose the library that supports your hardware" initial="ETHERNET_2" type="choice"> |
| 18 | + <Property id="CLIP_ETH_LIBRARY_TYPE" name="Ethernet library type" desc="Choose the library that supports your hardware" initial="ETHERNET_2" type="choice"> |
19 | 19 | <Choices>
|
20 | 20 | <Choice desc="Ethernet 2">ETHERNET_2</Choice>
|
21 | 21 | <Choice desc="UIP Ethernet">UIP_ENC28J60</Choice>
|
|
24 | 24 | <Choice desc="ESP8266 Arduino">ESP8266_WIFI</Choice>
|
25 | 25 | </Choices>
|
26 | 26 | </Property>
|
27 |
| - <Property id="REMOTE_IP_ADDRESS" name="IP Address of the server" initial="127.0.0.1" type="text" |
| 27 | + <Property id="CLIP_ADDR_TYPE" name="How to interpret the address field" initial="hardwired" type="choice" |
| 28 | + desc="The provided address can either be hardwired, a variable or compiler definition"> |
| 29 | + <Choices> |
| 30 | + <Choice desc="Address is a hardwired string">hardwired</Choice> |
| 31 | + <Choice desc="Address is a variable in my code">variable</Choice> |
| 32 | + <Choice desc="Address is a compiler definition">flag</Choice> |
| 33 | + </Choices> |
| 34 | + </Property> |
| 35 | + <Property id="CLIP_REMOTE_ADDRESS" name="Address of the server" initial="127.0.0.1" type="text" |
28 | 36 | desc="The IP address of the server to connect to."/>
|
29 |
| - <Property id="REMOTE_PORT" name="Remote Port" initial="3333" desc="The port on which the server is listening" |
| 37 | + <Property id="CLIP_REMOTE_PORT" name="Remote Port" initial="3333" desc="The port on which the server is listening" |
30 | 38 | type="int" min="0" max="65355"/>
|
31 | 39 | </Properties>
|
32 | 40 |
|
33 | 41 | <ApplicabilityDefs>
|
34 | 42 | </ApplicabilityDefs>
|
35 | 43 |
|
36 | 44 | <SourceFiles>
|
37 |
| - <Replacement find="Ethernet.h" replace="STM32Ethernet.h" whenProperty="ETH_LIBRARY_TYPE" isValue="STM32ETHERNET"/> |
38 |
| - <Replacement find="Ethernet.h" replace="UIPEthernet.h" whenProperty="ETH_LIBRARY_TYPE" isValue="UIP_ENC28J60"/> |
39 |
| - <Replacement find="Ethernet.h" replace="WiFi.h" whenProperty="ETH_LIBRARY_TYPE" isValue="ESP32_WIFI"/> |
40 |
| - <Replacement find="Ethernet.h" replace="ESP8266WiFi.h" whenProperty="ETH_LIBRARY_TYPE" isValue="ESP8266_WIFI"/> |
| 45 | + <Replacement find="Ethernet.h" replace="STM32Ethernet.h" whenProperty="CLIP_ETH_LIBRARY_TYPE" isValue="STM32ETHERNET"/> |
| 46 | + <Replacement find="Ethernet.h" replace="UIPEthernet.h" whenProperty="CLIP_ETH_LIBRARY_TYPE" isValue="UIP_ENC28J60"/> |
| 47 | + <Replacement find="Ethernet.h" replace="WiFi.h" whenProperty="CLIP_ETH_LIBRARY_TYPE" isValue="ESP32_WIFI"/> |
| 48 | + <Replacement find="Ethernet.h" replace="ESP8266WiFi.h" whenProperty="CLIP_ETH_LIBRARY_TYPE" isValue="ESP8266_WIFI"/> |
41 | 49 |
|
42 |
| - <Replacement find="EthernetClient" replace="UIPClient" whenProperty="ETH_LIBRARY_TYPE" isValue="UIP_ENC28J60"/> |
43 |
| - <Replacement find="EthernetServer" replace="UIPServer" whenProperty="ETH_LIBRARY_TYPE" isValue="UIP_ENC28J60"/> |
| 50 | + <Replacement find="EthernetClient" replace="UIPClient" whenProperty="CLIP_ETH_LIBRARY_TYPE" isValue="UIP_ENC28J60"/> |
| 51 | + <Replacement find="EthernetServer" replace="UIPServer" whenProperty="CLIP_ETH_LIBRARY_TYPE" isValue="UIP_ENC28J60"/> |
44 | 52 |
|
45 |
| - <Replacement find="EthernetClient" replace="WiFiClient" whenProperty="ETH_LIBRARY_TYPE" matches="ESP.*"/> |
46 |
| - <Replacement find="EthernetServer" replace="WiFiServer" whenProperty="ETH_LIBRARY_TYPE" matches="ESP.*"/> |
| 53 | + <Replacement find="EthernetClient" replace="WiFiClient" whenProperty="CLIP_ETH_LIBRARY_TYPE" matches="ESP.*"/> |
| 54 | + <Replacement find="EthernetServer" replace="WiFiServer" whenProperty="CLIP_ETH_LIBRARY_TYPE" matches="ESP.*"/> |
47 | 55 |
|
48 | 56 | <SourceFile name="ethernetSrc/ClientEthernetTransport.cpp"/>
|
49 | 57 | <SourceFile name="ethernetSrc/ClientEthernetTransport.h"/>
|
|
55 | 63 | </IncludeFiles>
|
56 | 64 |
|
57 | 65 | <GlobalVariables>
|
58 |
| - <Variable name="clientEthInit" type="ClientEthernetInitialisation" export="true"> |
59 |
| - <Param value='"${REMOTE_IP_ADDRESS}"' /> |
60 |
| - <Param value="${REMOTE_PORT}" /> |
| 66 | + <Variable name="${CLIP_REMOTE_ADDRESS}" type="const char*" export="only" whenProperty="CLIP_ADDR_TYPE" isValue="variable"/> |
| 67 | + <Variable name="clientEthInit" type="ClientEthernetInitialisation" export="true" whenProperty="CLIP_ADDR_TYPE" isValue="hardwired"> |
| 68 | + <Param value='"${CLIP_REMOTE_ADDRESS}"' /> |
| 69 | + <Param value="${CLIP_REMOTE_PORT}" /> |
| 70 | + </Variable> |
| 71 | + <Variable name="clientEthInit" type="ClientEthernetInitialisation" export="true" whenProperty="CLIP_ADDR_TYPE" isNotValue="hardwired"> |
| 72 | + <Param value="${CLIP_REMOTE_ADDRESS}" /> |
| 73 | + <Param value="${CLIP_REMOTE_PORT}" /> |
61 | 74 | </Variable>
|
| 75 | + |
62 | 76 | <Variable name="clientEthTransport" type="ClientEthernetTagValTransport" export="true"/>
|
63 | 77 | <Variable name="clientConnection" type="TagValueRemoteServerConnection" export="false">
|
64 | 78 | <Param value="clientEthTransport"/>
|
|
0 commit comments