class nixnet.system._databases.Alias(database_alias, database_filepath)[source]

Bases: object

Alias alias.


Get the filepath associated with the Alias object

class nixnet.system._databases.AliasCollection(handle)[source]


Alias aliases.

add_alias(database_alias, database_filepath, default_baud_rate=None)[source]

Add a new alias with baud rate size of up to 64 bits to a database file.

NI-XNET uses alias names for database files. The alias names provide a shorter name for display, allow for changes to the file system without changing the application.

This function is supported on Windows only.

  • database_alias (str) – Provides the desired alias name. Unlike the names of other XNET database objects, the alias name can use special characters such as space and dash. Commas are not allowed in the alias name. If the alias name already exists, this function changes the previous filepath to the specified filepath.
  • database_filepath (str) – Provides the path to the CANdb, FIBEX, or LDF file. Commas are not allowed in the filepath name.
  • default_baud_rate (int) – Provides the default baud rate, used when filepath refers to a CANdb database (.dbc) or an NI-CAN database (.ncd). These database formats are specific to CAN and do not specify a cluster baud rate. Use this default baud rate to specify a default CAN baud rate to use with this alias. If database_filepath refers to a FIBEX database (.xml) or LIN LDF file, the default_baud_rate parameter is ignored. The FIBEX and LDF database formats require a valid baud rate for every cluster, and NI-XNET uses that baud rate as the default.
get(k[, d]) → D[k] if k in D, else d. d defaults to None.

Return all aliases and database objects associated with those aliases in the system.

Yields:An iterator to tuple pairs of alias and database objects in the system.

Return all keys (alias names) used in the AliasCollection object.

Yields:An iterator to all the keys in the Alias object.

Return all Alias objects in the system.

Yields:An iterator to all the values in the AliasCollection object.