Package ixxat :: Package j1939api :: Module J1939api
[hide private]
[frames] | no frames]

Module J1939api

source code

Python Wrapper for the IXXAT J1939 API V1.1

This Python wrapper enables the use of the J1939 API with a more Python like interface class.

Classes [hide private]
  J1939Error
Exception class for J1939 API specific errors
  J1939Message
Definition of a J1939 message "struct" for transmission and reception.
  J1939
Python Wrapper for the J1939 API.
Functions [hide private]
 
GetVersion()
API functions return the product version number of the J1939 API.
source code
 
GetExceptionString(err)
API functions return a 32 bit unsigned value to indicate success or failure of the function.
source code
 
GetErrorString(err_code)
During the administration of an API instance, errors can occur independently from the calling of particular functions.
source code
 
GetBoardList()
Retrieves a list of available IXXAT CAN boards for use
source code
 
StrToRef(s_param)
Function for converting python strings to a C string reference for passing as a paramater to the Send() function
source code
 
RefToStr(ref_param)
Function for converting C string references received via the Receive() function to python strings
source code
Variables [hide private]
  PGN_ALL = 0xFFFFFFFF
  MSGTYPE_DATA = 0
  MSGTYPE_RAW = 1
  MSGTYPE_REQ = 2
  MSGTYPE_ERR = 3
  MSGTYPE_MASK = 7
  MSGTYPE_GLOBAL = 8
  PARAMTYPE_INVALID = 0
  PARAMTYPE_INTEGER = 1
  PARAMTYPE_FLOAT = 2
  PARAMTYPE_ASCII = 3
  PARAMTYPE_BITFIELD = 4
  PARAMTYPE_BINARY = 5
  PARAMTYPE_BLOB = 6
Function Details [hide private]

GetVersion()

source code 

API functions return the product version number of the J1939 API.

Parameters:
  • err - J1939 API Exception
Returns:
description string

GetExceptionString(err)

source code 

API functions return a 32 bit unsigned value to indicate success or failure of the function. This is represented as an exception in python. The function GetExceptionString() returns a string describing a particular exception value

Parameters:
  • err - J1939 API Exception
Returns:
description string

GetErrorString(err_code)

source code 

During the administration of an API instance, errors can occur independently from the calling of particular functions. These errors are then registered in the reception queue and delivered to the API as error messages. The error code part of the error message indicates the type of error and the location of the error occurance. The GetErrorString() function returns a string describing the error code.

Parameters:
  • err_code - 16 bit error code from stack
Returns:
description string

GetBoardList()

source code 

Retrieves a list of available IXXAT CAN boards for use

Returns:
list of tuples of (board name, serial number)

StrToRef(s_param)

source code 

Function for converting python strings to a C string reference for passing as a paramater to the Send() function

Parameters:
  • s_param - python string
Returns:
32-bit C string address

RefToStr(ref_param)

source code 

Function for converting C string references received via the Receive() function to python strings

Parameters:
  • ref_param - 32-bit C string address
Returns:
python string