Home | Trees | Indices | Help |
|
---|
|
object --+ | J1939
Python Wrapper for the J1939 API. Provides a native python interface to the IXXAT J1939 protocol stack.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
Initializes an instance of J1939 API class. The initialization includes the importation of the XML module file specified by the sXmlFile parameter for the mapping and demapping of the J1939 messages. The initialization also includes the initialization of the J1939 Stack software, which initializes and starts the CAN interface, starts J1939 address claiming and drives the reception and transmission of messages. The start-up of the CAN interface will require some time. The active state of the instance can be checked using the function getStackStatus().
|
Gets the status value of the J1939 Stack. Before the status is active, transmissions over the stack will fail.
|
Encodes and sends a J1939 message by copying the message into the stack internal transmission queue. Raw encoding can be performed by setting the message type byte of msg. If the raw message type is set, the input parameters will be evaluated as bytes and written directly to the J1939 message data field, otherwise, they will be evaluated as parameters to be converted into their appropriate raw data representation by the API using the information stored in the XML configuration file. Mapped messages return an error on the attempted transmission with an incorrect number of parameters. In the case of a full transmission queue, the Send() function will reattempt transmission until the timeout period has elapsed.
|
Decodes and returns a J1939 message or error message from the internal receive queue. The message type is stored in the least significant bits of the message status byte. Data PGNs will be decoded. Decoding is performed by the Codec unit using the information contained in the XML module file. If the received PGN is not included in the XML configuration file, the message will be decoded as raw, which copies the data from the data field byte for byte to the byte value list, and the raw message type in the message type byte will be set. The Receive() function will wait on an empty queue until the timeout period has elapsed.
|
Gets the current reception queue status, by representing the current number of messages in the receive queue. The queue has a depth of 1024 messages.
|
Registers a data PGN for reception with the stack. PGNs not found in XML configuration file will be decoded on reception as raw. The reception of an unregistered message directed to the API (not global) will cause an error message to be sent back to originating node. The reception of a registered data message will cause the message to be entered into the reception queue for retrieval by the user application.
|
Registers a request PGN for reception with the stack. The reception of an unregistered request message directed to the API (not global) will cause an error message to be sent back to originating node. The reception of a registered request message will cause the message to be entered into the reception queue as a request message for retrieval and handling by the user application.
|
Registers a data Rx PGN for timeout supervision. The function uses the RegisterDataPgn() functionality to register the PGN for reception by the stack and in addition, registers it with a cyclical test array within the API. On the timeout of an actively registered cyclic message, the J1939API_USR_ERR_CYC_TIMEOUT error message is entered into the reception queue. Cyclical PGNs are deactivated for testing on timeout, to prevent jamming of the reception queue with timeout messages. Cyclical PGNs are activated by the reception of a corresponding message following the initial registration or a previous cycle timeout. Remarks: The minimum resolution of the cycle time is 5 milliseconds. Cycle times will be rounded up to the next multiple of the timer resolution. The registration of cyclical PGNs also performs the registration of data PGNs.
|
Retrieves a list of SPNs within a given PGN. Note: The number of possible SPN structures returned is limited to 256.
|
Retrieves the attributes corresponding to a specific SPN. The applicable value can be determined by taking the returned value from the J1939 message, multiplying it by its resolution and adding the offset. The type of variable represented by the attribute entries "res", "off", "min" and "max" depend on the parameter type.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Mar 12 17:55:19 2014 | http://epydoc.sourceforge.net |