Supported platforms: CODESYS 2.3, CODESYS 3.5

 

List of AddressClaiming Library's Data Types

CODESYS 2.3CODESYS 2.3

Device

 

ACL_Device (STRUCT)

 

Name of the Member

Data Type

Description

Status

ACL_DeviceStatus

Device's state in address claiming

Address

BYTE

Current SA, valid when state = ACL_OK

OldAddress

BYTE

Previous known address for device

ClaimTimestamp

TIME

Last address claimed message timestamp

ClaimAttemptTimestamp

TIME

Updated when own device first claims new SA, not updated with resends

RequestTimestamp

TIME

Own devices: Start point for TxMsgDelay. System devices: Time when name was requested

TxMsgDelay

TIME

Generated delay for message sending. Relevant for own devices.

Name

ACL_DeviceName

For own ECU devices NAME is given to the server. For system devices NAME is collected from bus.

PackedName

ARRAY [0..7] OF BYTE

64-bit packed data from NAME

 

 

ACL_DeviceName (STRUCT)

 

Name of the Member

Data Type

Default value

Description

SelfConfigAddress

BYTE

0

Indicates whether a CF is self-configurable (1) or not (0) i.e. capable of changing SA.

J1939-81: Arbitrary address capable

IndustryGroup

BYTE

0

Assigned by standard. Industry associated with the NAME.

DeviceClassInstance

BYTE

0

Occurrence number of the device class in network.

J1939-81: Vehicle system instance

DeviceClass

BYTE

0

Assigned by standard. Depends on the industry group.

J1939-81: Vehicle system

Reserved

BYTE

0

Unused. Should always be zero.

FunctionName

BYTE

0

Values 0-127 assigned by standard. Values 128-253 definition depends on device class.

FunctionInstance

BYTE

0

Indicates occurrence number of a function.

EcuInstance

BYTE

0

Function's ECU occurrence number.

ManufacturerCode

WORD

0

Assigned by standard. Indicates manufacturer of the device.

IdentityNumber

DWORD

0

Assigned by manufacturer. Unique number e.g. ECU serial number.

 

 

ACL_DeviceStatus (ENUM)

 

Name of the Member

Value

Description

ACL_MISSING

-2

Previously active system device doesn't respond to request

ACL_CANNOT_CLAIM

-1

Cannot claim free SA

ACL_INITIALIZING

0

Device has not sent address claimed message

ACL_FIND_SA

1

Finding new free SA. Relevant for own devices.

ACL_SEND_CLAIM

2

Send address claimed PGN. Relevant for own devices.

ACL_CLAIM_ATTEMPTED

3

Device waits for contending claims

ACL_OK

4

Valid SA is claimed. Monitor new claims.

 

Server

ACL_ServerData (STRUCT)

 

Name of the Member

Data Type

Description

OwnDevices

ARRAY [1..G_ACL_MAX_NBR_OF_OWN_DEVICES] OF ACL_Device

Own claimed addresses

SystemDevices

ARRAY [1..G_ACL_MAX_NBR_OF_SYSTEM_DEVICES] OF ACL_Device

System claimed addresses

OwnDeviceCount

BYTE

Cannot exceed max number of own devices

LastClaimTimestamp

TIME

Time for previous claim message received

CANChannel

BYTE

Used CAN interface

CallbackErrors

ACL_ServerErrors

Errors which are given from callback to server

StructFooterTag

DWORD:=G_ACL_STRUCT_TAG

Internal struct footer TAG

 

 

ACL_ServerErrors (ENUM)

 

Name of the Member

Value

Description

ACL_ERROR_NONE

0

OK

ACL_ERROR_INIT_J1939

-1

J1939 not initialized

ACL_ERROR_INIT_RX

-2

Address claimed message COB-ID init failed

ACL_ERROR_INIT_RX_RQST

-3

Request callback message init failed

ACL_ERROR_INIT_TX_RQST

-4

Request tx PGN init failed

ACL_ERROR_INIT_DATA

-5

Own device inputs are not valid

ACL_ERROR_TX_CLAIM

-6

Cannot send address claimed message

ACL_ERROR_CALLBACK_PARAM

-7

Callback parameter data is invalid

ACL_ERROR_DEV_LIST_FULL

-8

System devices array does not have enough space

ACL_ERROR_NAME_CONFLICT

-9

Claim was received using duplicate name with own ECU

 

 

ACL_ServerState (ENUM)

 

Name of the Member

Default value

Description

ACL_SERVER_INIT

0

Initial state

ACL_SERVER_REQ_NAMES

1

Server sends global PGN request for system claimed NAMEs

ACL_SERVER_CLAIM_PROCESS

2

Execute claim steps for all ECU devices

 

 

Utility

ACL_DeviceMask (STRUCT)

 

Used to configuring the significant parts of device name for search.

 

Name of the Member

Data Type

Description

SelfConfigAddress

BOOL

Match self-config address

IndustryGroup

BOOL

Match industry group

DeviceClassInstance

BOOL

Match device class instance

DeviceClass

BOOL

Match device class

FunctionName

BOOL

Match function name

FunctionInstance

BOOL

Match function instance

EcuInstance

BOOL

Match ecu instance

ManufacturerCode

BOOL

Match manufacturer

 

ACL_SearchConditions (STRUCT)

 

Used to set conditions for searching matching device name from device list.

 

Name of the Member

Data Type

Description

Name

ACL_DeviceName

Configures the name data to match against device list

Mask

ACL_DeviceMask

Configures which parts of name is matched

 

ACL_DeviceToPGNState (ENUM)

 

Name of the Member

Default value

Description

ACL_PGN_INIT

0

Initialization

ACL_PGN_RESET

1

Reset sequence

ACL_PGN_MATCHING

2

Check address claiming for own device and system device

ACL_PGN_ADD

3

Add PGN to J1939 if not done

ACL_PGN_MONITORING

4

Monitor address claiming addresses and update PGN

 

ACL_DeviceToPGNErrors (ENUM)

 

Name of the Member

Default value

Description

ACL_PGN_ERROR_NONE

0

OK

ACL_PGN_ERROR_INPUT

-1

Error in inputs

ACL_PGN_ERROR_ADD_FAILED

-2

J1939 Add PGN returned error

 

 

 

 

CODESYS 3.5CODESYS 3.5

Device

Device (STRUCT)

 

Name of the Member

Data Type

Description

Status

DeviceStatus

Device's state in address claiming

Address

BYTE

Current SA, valid when state = ACL_OK

OldAddress

BYTE

Previous known address for device

ClaimTimestamp

TIME

Last address claimed message timestamp

ClaimAttemptTimestamp

TIME

Updated when own device first claims new SA, not updated with resends

RequestTimestamp

TIME

Own devices: Start point for TxMsgDelay. System devices: Time when name was requested

TxMsgDelay

TIME

Generated delay for message sending. Relevant for own devices.

Name

DeviceName

For own ECU devices NAME is given to the server. For system devices NAME is collected from bus.

PackedName

ARRAY [0..7] OF BYTE

64-bit packed data from NAME

 

 

DeviceName (STRUCT)

 

Name of the Member

Data Type

Default value

Description

SelfConfigAddress

BYTE

0

Indicates whether a CF is self-configurable (1) or not (0) i.e. capable of changing SA.

J1939-81: Arbitrary address capable

IndustryGroup

BYTE

0

Assigned by standard. Industry associated with the NAME.

DeviceClassInstance

BYTE

0

Occurrence number of the device class in network.

J1939-81: Vehicle system instance

DeviceClass

BYTE

0

Assigned by standard. Depends on the industry group.

J1939-81: Vehicle system

Reserved

BYTE

0

Unused. Should always be zero.

FunctionName

BYTE

0

Values 0-127 assigned by standard. Values 128-253 definition depends on device class.

FunctionInstance

BYTE

0

Indicates occurrence number of a function.

EcuInstance

BYTE

0

Function's ECU occurrence number.

ManufacturerCode

WORD

0

Assigned by standard. Indicates manufacturer of the device.

IdentityNumber

DWORD

0

Assigned by manufacturer. Unique number e.g. ECU serial number.

 

 

DeviceStatus (ENUM)

 

Name of the Member

Value

Description

ACL_MISSING

-2

Previously active system device doesn't respond to request

ACL_CANNOT_CLAIM

-1

Cannot claim free SA

ACL_INITIALIZING

0

Device has not sent address claimed message

ACL_FIND_SA

1

Finding new free SA. Relevant for own devices.

ACL_SEND_CLAIM

2

Send address claimed PGN. Relevant for own devices.

ACL_CLAIM_ATTEMPTED

3

Device waits for contending claims

ACL_OK

4

Valid SA is claimed. Monitor new claims.

 

Server

ServerData (STRUCT)

 

Name of the Member

Data Type

Description

OwnDevices

ARRAY [1..G_ACL_MAX_NBR_OF_OWN_DEVICES] OF Device

Own claimed addresses

SystemDevices

ARRAY [1..G_ACL_MAX_NBR_OF_SYSTEM_DEVICES] OF Device

System claimed addresses

OwnDeviceCount

BYTE

Cannot exceed max number of own devices

LastClaimTimestamp

TIME

Time for previous claim message received

CANChannel

BYTE

Used CAN interface

CallbackErrors

ServerErrors

Errors which are given from callback to server

StructFooterTag

DWORD:=G_ACL_STRUCT_TAG

Internal struct footer TAG

 

 

ServerErrors (ENUM)

 

Name of the Member

Value

Description

ACL_ERROR_NONE

0

OK

ACL_ERROR_INIT_J1939

-1

J1939 not initialized

ACL_ERROR_INIT_RX

-2

Address claimed message COB-ID init failed

ACL_ERROR_INIT_RX_RQST

-3

Request callback message init failed

ACL_ERROR_INIT_TX_RQST

-4

Request tx PGN init failed

ACL_ERROR_INIT_DATA

-5

Own device inputs are not valid

ACL_ERROR_TX_CLAIM

-6

Cannot send address claimed message

ACL_ERROR_CALLBACK_PARAM

-7

Callback parameter data is invalid

ACL_ERROR_DEV_LIST_FULL

-8

System devices array does not have enough space

ACL_ERROR_NAME_CONFLICT

-9

Claim was received using duplicate name with own ECU

 

 

ServerState (ENUM)

 

Name of the Member

Default value

Description

ACL_SERVER_INIT

0

Initial state

ACL_SERVER_REQ_NAMES

1

Server sends global PGN request for system claimed NAMEs

ACL_SERVER_CLAIM_PROCESS

2

Execute claim steps for all ECU devices

 

Utility

DeviceMask (STRUCT)

 

Used to configuring the significant parts of device name for search.

 

Name of the Member

Data Type

Description

SelfConfigAddress

BOOL

Match self-config address

IndustryGroup

BOOL

Match industry group

DeviceClassInstance

BOOL

Match device class instance

DeviceClass

BOOL

Match device class

FunctionName

BOOL

Match function name

FunctionInstance

BOOL

Match function instance

EcuInstance

BOOL

Match ecu instance

ManufacturerCode

BOOL

Match manufacturer

 

SearchConditions (STRUCT)

 

Used to set conditions for searching matching device name from device list.

 

Name of the Member

Data Type

Description

Name

DeviceName

Configures the name data to match against device list

Mask

DeviceMask

Configures which parts of name is matched

 

 

DeviceToPGNState (ENUM)

 

Name of the Member

Default value

Description

ACL_PGN_INIT

0

Initialization

ACL_PGN_RESET

1

Reset sequence

ACL_PGN_MATCHING

2

Check address claiming for own device and system device

ACL_PGN_ADD

3

Add PGN to J1939 if not done

ACL_PGN_MONITORING

4

Monitor address claiming addresses and update PGN

 

DeviceToPGNErrors (ENUM)

 

Name of the Member

Default value

Description

ACL_PGN_ERROR_NONE

0

OK

ACL_PGN_ERROR_INPUT

-1

Error in inputs

ACL_PGN_ERROR_ADD_FAILED

-2

J1939 Add PGN returned error

 

 

 

 

 

Source file topic000960.htm

Last updated 13-Jun-2024