| ApossC SDK V01.15

Functions
SDK_Communication_Ethernet.mh File Reference

Declaration of the Ethernet functions. More...

Go to the source code of this file.

## Functions
long | sdkEthernetSendString (wchar sendArray[], long handle)
long | sdkEthernetPrintConnectionStatus (long status)
long | sdkEthernetPrintGeneralResult (long result)

## Detailed Description

Declaration of the Ethernet functions.

Revision
  196

Definition in file SDK_Communication_Ethernet.mh.

## Function Documentation

## ◆ sdkEthernetPrintConnectionStatus()

long sdkEthernetPrintConnectionStatus | ( | long | status | ) |

Definition at line 50 of file SDK_Communication_Ethernet.mc.

51 {
52 switch(status)
53 {
54 case -2: print("SOCK_STATUS_ERROR ");
55 break;
56 case -1: print("SOCK_STATUS_ERRORSENDING");
57 break;
58 case 0: print("SOCK_STATUS_INIT");
59 break;
60 case 1: print("SOCK_STATUS_WAITING");
61 break;
62 case 2: print("SOCK_STATUS_CONNECTING");
63 break;
64 case 3: print("SOCK_STATUS_READY");
65 break;
66 case 4: print("SOCK_STATUS_CLOSED");
67 break;
68 default: print("SOCK_UNKNOW_STATUS: ",status);
69 break;
70 }
71 return(1);
72 }

## ◆ sdkEthernetPrintGeneralResult()

long sdkEthernetPrintGeneralResult | ( | long | result | ) |

Definition at line 89 of file SDK_Communication_Ethernet.mc.

90 {
91 printf("sdkEthernetPrintGeneralResult: ");
92 switch(result)
93 {
94 case 0: print("No error, everything OK");
95 break;
96 case -1: print("Out of memory error");
97 break;
98 case -2: print("Buffer error");
99 break;
100 case -3: print("Timeout");
101 break;
102 case -4: print("Routing problem");
103 break;
104 case -5: print("Operation in progress");
105 break;
106 case -6: print("Illegal value");
107 break;
108 case -7: print("Operation would block");
109 break;
110 case -8: print("Address in use");
111 break;
112 case -9: print("Already connected");
113 break;
114 case -10: print("Connection aborted");
115 break;
116 case -11: print("Connection reset");
117 break;
118 case -12: print("Connection closed");
119 break;
120 case -13: print("Not connected");
121 break;
122 case -14: print("Illegal argument");
123 break;
124 case -115: print("Low-level netif error");
125 break;
126 case -21: print("Invalid handle has been passed");
127 break;
128 case -22: print("Limit of socket connection exceeded");
129 break;
130 case -23: print("The socket is not connected");
131 break;
132 case -24: print("Too much data has been attempted to send");
133 break;
134 case -25: print("Previous data not yet sent");
135 break;
136 case -26: print("Previously received data has not been read and new data has arrived");
137 break;
138 case -27: print("Received telegram is too long for the internal buffer");
139 break;
140 case -28: print("This controller does not support the socket feature");
141 break;
142 case -29: print("The requested protocol type is not supported");
143 break;
144 default: print("Unknown result: ",result);
145 break;
146 }
147 return(1);
148 }

## ◆ sdkEthernetSendString()

long sdkEthernetSendString | ( | wchar | sendArray[],
|  | long | handle
| ) |  |

Definition at line 25 of file SDK_Communication_Ethernet.mc.

26 {
27 long result;
28
29 print("sdkEthernetSendString: ", sendArray);
30 result = EthernetSendTelegram(handle, sendArray, arraylen(sendArray));
31
32 return(result);
33 }

Data Sheets | Released Software | Software Manuals | Hardware Manuals | Maxon Shop

Maxon Support Center