Structs ¶ FILE_DIR_ENTRY (Struct)
FILE_DIR_ENTRY (STRUCT) ¶ TYPE FILE_DIR_ENTRY : STRUCT This data structure holds information of a directory entry. It is filled by FILE.DirList for every entry in the open directory by sequential call. InOut: Name Type Comment sEntry CAA.FILENAME Name of directory or file szSize CAA.SIZE File size xDirectory BOOL Directory or file: TRUE: directory, FALSE: file xExclusive BOOL Access mode on file: TRUE: exclusive access mode, FALSE: multiple access mode possible dtLastModification DT Date and time of last modification, e.g. 2006-05-08-00:00:00
GetMessageDataPointer (FUN) ¶ FUNCTION GetMessageDataPointer : POINTER TO CL2I.DATA Returns pointer to the eight data bytes of a message. Number of valid bytes can be retrieved by GetMessageLength . Note The data is organised in the “Network Byte Order“ of the CANbus. The alignment of data types in the RTS memory may differ from the alignment in the data messages. Example VAR hMsg : CAA.HANDLE ; pData : POINTER TO CL2I.DATA ; usiMsgLen : USINT ; byFirstByte : BYTE ; bySecondByte : BYTE ; eError : CL2.ERROR ; END_VAR IF hMsg <> CAA.gc_hINVALID THEN //Get message data pointer pData := CL2.GetMessageDataPointer ( hMessage := hMsg , peError := ADR ( eError )); usiMsgLen := CL2.GetMessageLength ( hMessage := hMsg , peError := ADR ( eError )); //get number of valid bytes IF pData <> CAA.gc_pNULL THEN byFirstByte := pData ^ [0] ; bySecondByte := pData ^ [1] ; END_IF END_IF InOut: Scope Name Type Comment Return GetMessageDataPointer POINTER TO CL2I.DATA Pointer to message data Input hMessage CAA.HANDLE handle of message peError POINTER TO ERROR optional pointer to error enum
GetMessageId (FUN) ¶ FUNCTION GetMessageId : CL2I.COBID Returns the COBID of a message InOut: Scope Name Type Comment Return GetMessageId CL2I.COBID COBID of a message Input hMessage CAA.HANDLE handle of received message peError POINTER TO ERROR optional pointer to error enum
GetMessageLength (FUN) ¶ FUNCTION GetMessageLength : USINT Returns number of valid bytes in message. Example See GetMessageDataPointer . InOut: Scope Name Type Comment Return GetMessageLength USINT number of valid data bytes in message Input hMessage CAA.HANDLE handle of message peError POINTER TO ERROR optional pointer to error enum
GetMsgCount (FUN) ¶ FUNCTION GetMsgCount : CAA.COUNT Returns the number of messages in the receive queue of a given receiver. InOut: Scope Name Type Comment Return GetMsgCount CAA.COUNT number of messages in receive queue of hReceiverId . Input hReceiverId CAA.HANDLE receiver handle peError POINTER TO ERROR optional pointer to error enum
GetNetId (FUN) ¶ FUNCTION GetNetId : USINT Returns the NetID of a given message. InOut: Scope Name Type Comment Return GetNetId USINT NetID of hMessage . Input hMessage CAA.HANDLE handle of received message peError POINTER TO ERROR optional pointer to error enum
GetTimeStamp (FUN) ¶ FUNCTION GetTimeStamp : UDINT Returns the time stamp of a given message (if supported by CAN driver, else 0). InOut: Scope Name Type Comment Return GetTimeStamp UDINT Time Stamp of hMessage . Input hMessage CAA.HANDLE handle of received message peError POINTER TO ERROR optional pointer to error enum
Is29BitIdMessage (FUN) ¶ FUNCTION Is29BitIdMessage : BOOL This function determines if a specified message has an identifier with 11 bits or 29 bits. InOut: Scope Name Type Comment Return Is29BitIdMessage BOOL TRUE if messages is a 29 bit CAN message. Input hMessage CAA.HANDLE handle of message peError POINTER TO ERROR optional pointer to error enum
IsRTRMessage (FUN) ¶ FUNCTION IsRTRMessage : BOOL This function specifies whether a message is an RTR message. InOut: Scope Name Type Comment Return IsRTRMessage BOOL TRUE if messages is a RTR CAN message. Input hMessage CAA.HANDLE handle of message peError POINTER TO ERROR optional pointer to error enum