FDXClientHandleTcp
Syntax
long FDXClientHandleTcp(dword ipv4Address, dword port); // form 1
long FDXClientHandleTcp(byte ipv6Address[], dword port); // form 2
Function
This function creates an FDX client handle for the FDX client with the specified address. Prerequisite for the function is to configureTCP/IPv4orTCP/IPv6as transport layer for the
FDX feature.
Parameters
ipv4Address IPv4 address of the FDX clients
ipv6Address
IPv6 address of the FDX clients
port
TCP port number of the FDX clients.
Return Values
If successful, the function returns a value greater than 0, which means the FDX client handle. Values smaller than or equal to zero indicate an error.
-1: The FDX feature is disabled in theCANoeconfiguration or configured for another transport layer.
for TCP/IPv4 long fdxClientHandle = 0;dword fdxClientPort = 0;dword fdxClientAddr = 0;fdxClientAddr = IpGetAddressAsNumber("127.0.0.1");fdxClientPort = 2810;fdxClientHandle = FDXClientHandleTcp(fdxClientAddr, fdxClientPort);
for TCP/IPv6 long fdxClientHandle = 0;dword fdxClientPort = 0;byte fdxClientAddr[16];IpGetAddressAsArray("::1", fdxClientAddr);fdxClientPort = 2820;fdxClientHandle = FDXClientHandleTcp(fdxClientAddr, fdxClientPort);
Coupling of two CANoe Instances using the FDX Protocol | FDXClientHandleUdp