nixnet.database.lin_sched
- class nixnet.database._lin_sched.LinSched(**kwargs: int)[source]
Bases:
DatabaseObjectDatabase LIN schedule
- check_config_status() None[source]
Check this LIN schedule’s configuration status.
By default, incorrectly configured schedules in the database are not returned from
Cluster.lin_schedulesbecause they cannot be used in the bus communication. You can change this behavior by settingDatabase.show_invalid_from_opento True. When a schedule configuration status becomes invalid after the database is opened, the schedule still is returned fromCluster.lin_scheduleseven ifDatabase.show_invalid_from_openis False.- Raises:
XnetError – The LIN schedule is incorrectly configured.
- property clst: Cluster
Get the parent cluster in which the you created the schedule.
You cannot change the parent cluster after creating the schedule object.
- Type:
- property comment: str
Get or set a comment describing the schedule object.
A comment is a string containing up to 65535 characters.
- Type:
str
- property entries: DbCollection
Collection of
LinSchedEntryfor 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:
- find(object_class: Type[DatabaseObject], object_name: str) DatabaseObject[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,
FrameforSignal), theobject_nameto search for can be short, and the search proceeds quickly.If this object is not a direct parent (for example,
DatabaseforSignal), theobject_nameto 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, andobject_classisSignal, you can specifyobject_nameofmySignal, assuming that signal name is unique to the cluster. If not, you must include theFramename as a prefix, such asmyFrameA.mySignal.NI-XNET supports the following subclasses of
DatabaseObjectas arguments forobject_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.
- property name: str
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
- property priority: int
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_modeproperty isONCE. 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
- property run_mode: LinSchedRunMode
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 isONCE.- Type: