ReturnValues (GVL) ¶ InOut: Scope Name Type Initial Comment Constant ERR_OK UDINT 16#0 ERR_FAILED UDINT 16#FFFFFFFF ERR_NOBUFFER UDINT 16#6 ERR_PENDING UDINT 16#A ERR_CHC_CHINVALID UDINT 16#1A1 Channel Id invalid ERR_CHC_TIMEOUT UDINT 16#1A2 Channel closed or connect failed due to a timeout ERR_CHC_PROTOCOL UDINT 16#1A3 Protocol error ERR_CHC_CHECKSUM UDINT 16#1A4 Inrecoverable transmission error (checksum) etc. ERR_CHC_MODEHOST UDINT 16#1A5 The client application tried to send a message although the channel is in receive mode ERR_CHC_MODEPEER UDINT 16#1A6 Incoming message although the channel is in send mode. ERR_CHC_NUMCHANNELS UDINT 16#1A7 No more channels available. ERR_CHC_CLOSED UDINT 16#1A8 Channel closed by peer ERR_CHC_MESSAGESIZE UDINT 16#1A9 Message exceeds the commbuffer size ERR_CHC_NOCHBUFFER UDINT 16#1AA Not enough memory to provide the required communication buffer
Structures ¶ CHCAddressComponent (Struct) CHCAddressType (Enum) CHCPeerAddress (Struct) CHCProtocolDataUnit (Struct)
CHCAddressComponent (STRUCT) ¶ TYPE CHCAddressComponent : STRUCT InOut: Name Type Components ARRAY [0..1] OF BYTE
CHCAddressType (ENUM) ¶ TYPE CHCAddressType : InOut: Name Initial Absolute 0 Relative 1
CHCPeerAddress (STRUCT) ¶ TYPE CHCPeerAddress : STRUCT InOut: Name Type Initial Comment dwStructSize DWORD SIZEOF(THIS^) addrType CHCAddressType / Determines whether the specified address is a relative OR an absolute address. nAddrOffset DINT Only valid, if type==AT_RELATIVE. Contains the negative number of address components to move up in the node tree, before going down the path specified in pAddress. (e.g. “-1” to move up one level). This field specifies the initial value of AdrIndex in router package header. nAddrLength UDINT Number of valid elements in array pointed to by pAddress nAddrComponentCount UDINT (SIZEOF(addrComponents) / SIZEOF(addrComponents[0])) For possible extensibility of further address components addrComponents ARRAY [0..(MAX_NODE_ADDR_LEN - 1)] OF CHCAddressComponent
CHCProtocolDataUnit (STRUCT) ¶ TYPE CHCProtocolDataUnit : STRUCT InOut: Name Type dwSize DWORD pData POINTER TO BYTE
Test ¶ HandleChannelError (Function) HandleReply (Function) SetError (Function) Test_PRG (Program) SetupAddress (Action) Test_State (Enum)
HandleChannelError (FUN) ¶ FUNCTION HandleChannelError : UDINT InOut: Scope Name Type Return HandleChannelError UDINT Input wChannelHandle WORD diError UDINT
HandleReply (FUN) ¶ FUNCTION HandleReply : UDINT InOut: Scope Name Type Return HandleReply UDINT Input wChannelHandle WORD data CHCProtocolDataUnit
SetError (FUN) ¶ FUNCTION SetError : BOOL InOut: Scope Name Type Return SetError BOOL Input stError STRING