AREthOpenLocalApplicationEndpoint
Valid for: CANoe DE • CANoe4SW DEFunction Syntax
dword AREthOpenLocalApplicationEndpoint(dword transportProtocol, dword port); // form 1dword AREthOpenLocalApplicationEndpoint(dword transportProtocol, dword port, dword ipv4Address); // form 2dword AREthOpenLocalApplicationEndpoint(dword transportProtocol, dword port, byte ipv6Address[]); // form 3dword AREthOpenLocalApplicationEndpoint(IP_Endpoint localIPEndpoint); // form 4
Description
Opens an application endpoint. An endpoint represents a socket. The IP address is the IP address of the current interface, which is determined by the bus context. Services can be assigned to an Application Endpoint using the AREthCreateProvidedServiceInstance or AREthCreateConsumedServiceInstance function. An Application Endpoint can be closed again using the AREthCloseLocalApplicationEndpoint function. Note This only works with the node TCP/IP stack; in the Windows TCP/IP stack the interface cannot be determined by the bus context. The SD endpoints can be configured using the properties of AUTOSAR Eth IL (see also: AREthSetProperty).Parameters
-
transportProtocol
- 6: TCP
- 17: UDP
-
port
- UDP: Port on which the messages can be both sent and received.
- TCP: Port on which the messages can be either sent or received. If a node is to receive and send messages, two Application Endpoints must be set up: one for the receive direction and the other for the send direction.
-
ipv4Address
- Bind the socket to this IPv4 address. The address should be given in network byte order.
-
ipv6Address
- Bind the socket to this IPv6 address. The 16 bytes in the array should be given in network byte order.
-
localIPEndpoint
- Object of type IP_Endpoint that contains the address/port of the local endpoint.
Return Values
-
0
- An error occurred. The error can be evaluated using the AREthGetLastError function.
-
>0
- Handle of the created Application Endpoint.