nixnet.database.lin_sched

class nixnet.database._lin_sched.LinSched(**kwargs)[source]

Bases: nixnet.database._database_object.DatabaseObject

Database LIN schedule

check_config_status()[source]

Check this LIN schedule’s configuration status.

By default, incorrectly configured schedules in the database are not returned from Cluster.lin_schedules because they cannot be used in the bus communication. You can change this behavior by setting Database.show_invalid_from_open to True. When a schedule configuration status becomes invalid after the database is opened, the schedule still is returned from Cluster.lin_schedules even if Database.show_invalid_from_open is False.

Raises:XnetError – The LIN schedule is incorrectly configured.
clst

Get the parent cluster in which the you created the schedule.

You cannot change the parent cluster after creating the schedule object.

Type:Cluster
comment

Get or set a comment describing the schedule object.

A comment is a string containing up to 65535 characters.

Type:str
entries

Collection of LinSchedEntry for this LIN schedule.

The position of each entry in this collection specifies the position in the schedule. The database file and/or the order that you create entries at runtime determine the position.

Type:DbCollection
find(object_class, object_name)[source]

Finds an object in the database.

This function finds a database object relative to this parent object. This object may be a grandparent or great-grandparent.

If this object is a direct parent (for example, Frame for Signal), the object_name to search for can be short, and the search proceeds quickly.

If this object is not a direct parent (for example, Database for Signal), the object_name to search for must be qualified such that it is unique within the scope of this object.

For example, if the class of this object is Cluster, and object_class is Signal, you can specify object_name of mySignal, assuming that signal name is unique to the cluster. If not, you must include the Frame name as a prefix, such as myFrameA.mySignal.

NI-XNET supports the following subclasses of DatabaseObject as arguments for object_class:

Parameters:
  • object_class (DatabaseObject) – The class of the object to find.
  • object_name (str) – The name of the object to find.
Returns:

An instance of the found object.

Raises:
  • ValueError – Unsupported value provided for argument object_class.
  • XnetError – The object is not found.
name

Get or set the name of the LIN schedule object.

Lowercase letters, uppercase letters, numbers, and the underscore (_) are valid characters for the short name. The space ( ), period (.), and other special characters are not supported within the name. The short name must begin with a letter (uppercase or lowercase) or underscore, and not a number. The short name is limited to 128 characters.

A schedule name must be unique for all schedules in a cluster.

Type:str
priority

Get or set the priority of a run-once LIN schedule.

This priority applies when multiple run-once schedules are pending for execution.

The valid range for this property is 1-254. Lower values correspond to higher priority.

This property applies only when the LinSched.run_mode property is ONCE. Run-once schedule requests are queued for execution based on this property. When all run-once schedules have completed, the master returns to the previously running continuous schedule (or null).

Run-continuous schedule requests are not queued. Only the most recent run-continuous schedule is used, and it executes only if no run-once schedule is pending. Therefore, a run-continuous schedule has an effective priority of 255, but this property is not used.

Null schedule requests take effect immediately and supercede any running run-once or run-continuous schedule. The queue of pending run-once schedule requests is flushed (emptied without running them). Therefore, a null schedule has an effective priority of 0, but this property is not used.

This property is not read from the database, but is handled like a database property. After opening the database, the default value is returned, and you can change the property. But similar to database properties, you cannot change it after a session is created.

Type:int
run_mode

Get or set how the master runs this schedule.

This property is not read from the database, but is handled like a database property. After opening the database, the default value is returned, and you can change the property. But similar to database properties, you cannot change it after a session is created.

Usually, the default value for the run mode is CONTINUOUS. If the schedule is configured to be a collision resolving table for an event-triggered entry, the default is ONCE.

Type:LinSchedRunMode