vspyx.Runtime
Package Contents
Classes
Represents the serializable base type identifier information associated with a given resolvable object |
|
A component is the basic piece of functionality that the runtime is composed of. |
|
Represents the basic interface of a runtime component |
|
Represents the conversion and scaling between runtime values and their physical representations |
|
DataDefinition gives the definition of how a piece of data |
|
Represents the runtime domain of managed and monitored datapoints |
|
Represents a runtime module |
|
An instance of a Topology Object (e.g. PDU, Signal, etc) |
|
Represents a managed collection of cacheable point objects with controlled access to their values |
|
Represents the data flow level of a given data element or sub-element |
|
Represents a periodic and time-scalable, managed runtime task |
|
SchedulerTicker |
|
A signal, which is an abstract quantity of information that has a definite value at a given point in time |
|
Represents a specfic value of a signal at a point in time. |
|
Represents a runtime signal which contains data internal to the function of the runtime system (eg pending traffic, pending frame count, etc) |
|
Represents a group of related system signals |
|
Represents a system signal value at a given time |
|
Represents a signal point value timestamp |
|
Represents a continually observed and runtime manipulatable interface to a datapoint |
|
Represents the basis of a value which can be contually monitored (traced) at runtime |
|
A class which facilitates the storage of Runtime::Traces for the user |
|
Represents a unit for a physical value, such as "volts" or "mph". |
|
Represents channel utilization statistics |
|
Special type indicating an unconstrained type. |
- class vspyx.Runtime.BaseType
Bases:
vspyx.Core.ResolverObject
Represents the serializable base type identifier information associated with a given resolvable object
- OnConfigurationMutation :vspyx.Core.Callback_634bd5c449
- CloneConfiguration(self) Any
- class vspyx.Runtime.Component
Bases:
vspyx.Core.ResolverObject
,ComponentInterface
A component is the basic piece of functionality that the runtime is composed of.
- Initialized :bool
- Running :bool
- InitializeEnvironment(self, sched: Scheduler, env: Environment) Any
- ShutdownEnvironment(self) Any
- StartComponent(self) Any
- StartComponent(self, sched: Scheduler) Any
- StartComponent(self, sched: Scheduler, env: Environment) Any
- StopComponent(self) Any
- class vspyx.Runtime.ComponentInterface
Represents the basic interface of a runtime component
- Initialized :bool
- Running :bool
- InitializeEnvironment(self, sched: Scheduler, env: Environment) Any
- ShutdownEnvironment(self) Any
- StartComponent(self) Any
- StartComponent(self, sched: Scheduler) Any
- StartComponent(self, sched: Scheduler, env: Environment) Any
- StopComponent(self) Any
- class vspyx.Runtime.CompuMethod
Bases:
vspyx.Core.ResolverObject
Represents the conversion and scaling between runtime values and their physical representations
- OnConfigurationMutation :vspyx.Core.Callback_634bd5c449
- CloneConfiguration(self) Any
- InternalToPhysical(self, internal: vspyx.Core.Numeric) Any
- static New(config: Any) CompuMethod
- PhysicalToInternal(self, physical: Any) vspyx.Core.Numeric
- class vspyx.Runtime.DataDefinition
Bases:
vspyx.Core.ResolverObject
DataDefinition gives the definition of how a piece of data should be stored and presented
- BaseType :BaseType
Get the base type
- CompuMethod :CompuMethod
- OnConfigurationMutation :vspyx.Core.Callback_634bd5c449
- CloneConfiguration(self) Any
- static New(baseType: BaseType, compuMethod: CompuMethod) DataDefinition
- static New(config: Any) DataDefinition
- class vspyx.Runtime.Environment
Bases:
Component
Represents the runtime domain of managed and monitored datapoints
- OnPoint :vspyx.Core.Callback_bf2c6c2abd
- AddTrace(self, trace: Trace) Any
Manually add a Trace.
Throws a RuntimeError if the Traceable is already traced here.
- static New() Environment
- class vspyx.Runtime.Module
Bases:
vspyx.Core.Module
Represents a runtime module
- class vspyx.Runtime.Point
Bases:
vspyx.Core.Linkable
An instance of a Topology Object (e.g. PDU, Signal, etc) While those Topology Objects describe the long running state of the object, a Point describes a single occurence of that Topology Object in time.
- class AttributeRecord
AttributeRecord
- AliasTo :str
- Dynamic :bool
- Inheritable :bool
- Inherited :bool
- RenderingHint :vspyx.Core.Numeric.RenderingHint
- static MakeAlias(to: str) Point.AttributeRecord
- static MakeBuiltIn() Point.AttributeRecord
- static MakeBuiltIn(inheritable: bool) Point.AttributeRecord
- static MakeDynamic() Point.AttributeRecord
- class Consuming_03654c56a8
Consuming<Communication::DataLinkPDUPoint>
- Point :Point
- assign(self, rhs: Point.Consuming_03654c56a8) Point.Consuming_03654c56a8
- class Consuming_1dd119a6a6
Consuming<Communication::CANFramePoint>
- Point :Point
- assign(self, rhs: Point.Consuming_1dd119a6a6) Point.Consuming_1dd119a6a6
- class Consuming_1edf1860a4
Consuming<Runtime::Point>
- Point :Point
- assign(self, rhs: Point.Consuming_1edf1860a4) Point.Consuming_1edf1860a4
- assign(self, rhs: Point.Consuming_1edf1860a4) Point.Consuming_1edf1860a4
- class Consuming_2215b345f6
Consuming<Communication::ISignalIPDUPoint>
- Point :Point
- assign(self, rhs: Point.Consuming_2215b345f6) Point.Consuming_2215b345f6
- class Consuming_5056ff9b42
Consuming<Communication::CANDataLinkPDUPoint>
- Point :Point
- assign(self, rhs: Point.Consuming_5056ff9b42) Point.Consuming_5056ff9b42
- class Consuming_50a4704bd5
Consuming<Runtime::SystemSignalPoint>
- Point :Point
- assign(self, rhs: Point.Consuming_50a4704bd5) Point.Consuming_50a4704bd5
- class Consuming_6aef469678
Consuming<Communication::FramePoint>
- Point :Point
- assign(self, rhs: Point.Consuming_6aef469678) Point.Consuming_6aef469678
- class Consuming_99a0dbe01e
Consuming<Communication::ISO11898::LConfirmPoint>
- Point :Point
- assign(self, rhs: Point.Consuming_99a0dbe01e) Point.Consuming_99a0dbe01e
- class Consuming_9f8cd48833
Consuming<Communication::MultiplexedIPDUPoint>
- Point :Point
- assign(self, rhs: Point.Consuming_9f8cd48833) Point.Consuming_9f8cd48833
- class Consuming_a508b640d2
Consuming<Communication::ISO11898::LDataPoint>
- Point :Point
- assign(self, rhs: Point.Consuming_a508b640d2) Point.Consuming_a508b640d2
- class Consuming_e1c4fc4e95
Consuming<Communication::ISignalGroupPoint>
- Point :Point
- assign(self, rhs: Point.Consuming_e1c4fc4e95) Point.Consuming_e1c4fc4e95
- class Consuming_e473ff5c76
Consuming<Communication::ISignalPoint>
- Point :Point
- assign(self, rhs: Point.Consuming_e473ff5c76) Point.Consuming_e473ff5c76
- class Consuming_fe9efbf398
Consuming<Communication::TDataPoint>
- Point :Point
- assign(self, rhs: Point.Consuming_fe9efbf398) Point.Consuming_fe9efbf398
- class Direction
Bases:
enum.IntEnum
Enum where members are also (and must be) ints
- Receive = 0
- Transmit = 1
- class Interesting
Bases:
enum.IntEnum
How interesting is the Point? In other words, is the user likely to care about a Point at this level, or would it have to turn into something more before it is interesting to the user?
As an example, CAN DataLinkPDUs are interesting on their own. An ISO11898-1 LDataPoint will be created from it, but the user will still be more interested in the DataLinkPDUPoint until the LDataPoint becomes an ISO15765-2 TDataPoint, etc.
- No = 2
- SuccessorsMayBe = 1
- Yes = 0
- Level :PointLevel
The level of this point
- PointDirection :Point.Direction
The direction of this point, named to avoid clashes with enum Point::Direction
- Timestamp :Timestamp
The time that this point was created/set
- Traceable :Traceable
The tracable this point is associated with
If the point is not associated with a traceable or the traceable has expired, nullptr will be returned.
- DecrementConsumers(self) Any
Decrement the count of current consumers, use the AcquireConsumerLock() RAII helper instead when possible
See AcquireConsumerLock() for more information about the ConsumerLock
This operation is thread-safe
- GetAttribute(self, type: str) Value
Get an attribute of this point by its tag
If the attribute doesn’t exist, an empty Runtime::Value will be returned.
- GetInteresting(self) Point.Interesting
See documentation for Runtime.Point.Interesting.
- IncrementConsumers(self) Any
- IsDoneBeingConsumed(self) bool
- LinkChild(self, newChild: vspyx.Core.Linkable) Any
- LinkUpstream(self, upstream: Point) Any
- LinkUpstream(self, upstream: Point, inheritAndRelevel: bool) Any
- LinkUpstream(self, upstream: List[Point]) Any
- LinkUpstream(self, upstream: List[Point], inheritAndRelevel: bool) Any
Helper for LinkUpstream that links a vector of points, such as might be received in the New functions for Points.
By default, this function resets the timestamp and PointLevel for these points as if the incoming Points were passed to the initial constructor.
- SetAttribute(self, type: str, value: Value) bool
Set an attribute on this point dynamically
Returns true if the attribute could be set
The attribute can not be set if a subclass implements a read-only attribute on this point (built-in attributes are read-only by default, unless a setter is explicitly provided)
This should only be done while the point is Consuming
These “dynamic” attributes are lower in priority than built-in attributes, but higher in priority than any inherited attributes.
- TimestampSet(self, nTimestamp: Timestamp) Any
Set the timestamp for this point
This should generally not be used, as in most circumstances as in most circumstances a timestamp will be set automatically for you.
This should only be done while the point is Consuming
- UnlinkChild(self, newChild: vspyx.Core.Linkable) Any
- VisitDownstreamPoints(self, fn: vspyx.Core.Function_5230b09a44) Any
Call :Parameter fn: for each of the downstream points
If the returned bool from :Parameter fn: is false, the visiting breaks early.
“Downstream” points are the child points in case of Direction::Receive, and the parent points in case of Direction::Transmit.
- VisitUpstreamPoints(self, fn: vspyx.Core.Function_5230b09a44) Any
Call :Parameter fn: for each of the upstream points
If the returned bool from :Parameter fn: is false, the visiting breaks early.
“Upstream” points are the parent points in case of Direction::Receive, and the child points in case of Direction::Transmit.
- class vspyx.Runtime.PointCache
Bases:
vspyx.Core.Object
Represents a managed collection of cacheable point objects with controlled access to their values
- MaximumSize :int
- class vspyx.Runtime.PointLevel
Represents the data flow level of a given data element or sub-element
- class Primary
Bases:
enum.IntFlag
Support for integer-based Flags
- DataLinkPDU = 1
- InteractionPDU = 3
- NetworkPDU = 2
- Signal = 5
- SignalPDU = 4
- Unknown = 0
- primary :PointLevel.Primary
- secondary :int
- static MaxSecondary() int
- static PrimaryToString(p: PointLevel.Primary) int
- __eq__(self, other: PointLevel) bool
Return self==value.
- __ne__(self, other: PointLevel) bool
Return self!=value.
- __str__(self) str
Return str(self).
- class vspyx.Runtime.Scheduler
Bases:
Component
Represents a periodic and time-scalable, managed runtime task
- IsRunning :bool
- Now :Timestamp
- Realtime :bool
- Ticker :SchedulerTicker
- TimeScale :float
- TimeSinceStart :Any
- CloneState(self) Any
- GetMainCallback(self) vspyx.Core.Callback_b113cdf49d
- GetMainCallback(self, component: Component) vspyx.Core.Callback_b113cdf49d
Get a callback that will be raised on every “main” processing loop. The callbacks registered by this function should be short lived and not block. In particular, they must never call Runtime::Wait, Runtime::WaitFor, Runtime::WaitUntil. :Parameter component: Optional component that was previously added with AddComponent. If specified, the callback may occur on a separate processing thread for the component
- GetTimingCallback(self, interval: Any) vspyx.Core.Callback_b113cdf49d
- GetTimingCallback(self, interval: Any, component: Component) vspyx.Core.Callback_b113cdf49d
Get a callback that will be raised at an interval. The callbacks registered by this function should be short lived and not block. In particular, they must never call Runtime::Wait, Runtime::WaitFor or Runtime::WaitUntil. :Parameter micros: duration, in microseconds, between successive raises of the callback :Parameter component: Optional component that was previously added with AddComponent. If specified, the callback may occur on a separate processing thread for the component :Returns: callback object
- Log(self, tag: str) vspyx.Core.Log
- NewThread(self, func: Callable) Any
- Start(self) Any
- Stop(self) Any
- UpdateState(self, state: Any) Any
- Wait(self, interrupt: vspyx.Core.Event) Any
Wait indefinitely for the given Core::Event to be set.
Throws if the scheduler stops while waiting.
- WaitFor(self, nanos: Any) Any
- WaitFor(self, nanos: Any, interrupt: vspyx.Core.Event) bool
Wait either for the given Core::Event to be set, or the given amount of time.
Returns true if the event was set, or false if the timeout was reached.
Throws if the scheduler stops while waiting.
- WaitUntil(self, timestamp: Timestamp) Any
- WaitUntil(self, timestamp: Timestamp, interrupt: vspyx.Core.Event) bool
Wait either for the given Core::Event to be set, or until the given timestamp.
Returns true if the event was set, or false if the given timestamp was reached.
Throws if the scheduler stops while waiting.
- class vspyx.Runtime.SchedulerTicker
Bases:
vspyx.Core.Object
SchedulerTicker
- class vspyx.Runtime.Signal
Bases:
Traceable
A signal, which is an abstract quantity of information that has a definite value at a given point in time
- Definition :DataDefinition
Get the definition of the value of this signal. A signal may have no definition
- class vspyx.Runtime.SignalPoint
Bases:
Point
Represents a specfic value of a signal at a point in time.
The data type of the physical value and the internal value may be different. For example, state encoded signals have a numeric internal value, but a string physical value.
- InternalValue :Any
Get native representation of the signal
- PhysicalValue :Any
Get the interpreted or “logical” value, which is calculated from the internal value.
- Valid :bool
Denotes if the signal’s value is “invalid” (when set to false). This is different from being not present. An invalid value means the signal was set, but the value it was set to was outside some validation parameters.
- class vspyx.Runtime.SystemSignal
Bases:
Signal
Represents a runtime signal which contains data internal to the function of the runtime system (eg pending traffic, pending frame count, etc)
- OnConfigurationMutation :vspyx.Core.Callback_634bd5c449
- CloneConfiguration(self) Any
- static New() SystemSignal
- static New(description: str, read: vspyx.Core.Function_1d184840f7) SystemSignal
- static New(config: Any) SystemSignal
Create a new generic asynchronously updated Traceable.
When working in Python, creating a more specific Traceable is correct rather than creating this generic one, unless you are implementing your own protocol.
- NewPoint(self, physicalValue: Any, internalValue: Any, valid: bool, timestamp: Timestamp) Point.Consuming_50a4704bd5
- class vspyx.Runtime.SystemSignalGroup
Bases:
Traceable
Represents a group of related system signals
- OnConfigurationMutation :vspyx.Core.Callback_634bd5c449
- CloneConfiguration(self) Any
- static New() SystemSignalGroup
- static New(description: str) SystemSignalGroup
- static New(config: Any) SystemSignalGroup
Create a new generic asynchronously updated Traceable.
When working in Python, creating a more specific Traceable is correct rather than creating this generic one, unless you are implementing your own protocol.
- class vspyx.Runtime.SystemSignalPoint
Bases:
SignalPoint
Represents a system signal value at a given time
- static New(systemSignal: SystemSignal, physicalValue: Any, internalValue: Any, valid: bool, timestamp: Timestamp) Point.Consuming_50a4704bd5
- class vspyx.Runtime.Timestamp
Represents a signal point value timestamp
- DateTime :Any
- NanosSince1Jan2007 :Any
- __str__(self) str
Return str(self).
- class vspyx.Runtime.Trace
Bases:
vspyx.Core.Object
Represents a continually observed and runtime manipulatable interface to a datapoint
- class Statistics
Statistics
- class ChangeTime
ChangeTime
- class Direction
Bases:
enum.IntEnum
Enum where members are also (and must be) ints
- Down = 2
- NONE = 0
- Up = 1
- BeforeLastTime :Any
- ChangeDirection :Trace.Statistics.ChangeTime.Direction
- LastTime :Any
- Push(self, thisTime: Any) Any
- Push(self, thisTime: Any, thisChangeDirection: Trace.Statistics.ChangeTime.Direction) Any
- BeforeLastPoint :Point
- Count :int
- CountChangeTime :Trace.Statistics.ChangeTime
- LastPoint :Point
- PayloadChangeTimes :List[Trace.Statistics.ChangeTime]
- Present :bool
- Reset(self) Any
- SetNotPresent(self) Any
- BeforeLastPoint :Point
- Count :int
- LastPoint :Point
- NewPointEvent :vspyx.Core.Event
- OnPoint :vspyx.Core.Callback_2fac57aba0
- Present :bool
- Traceable :Traceable
- SetNotPresent(self) Any
- class vspyx.Runtime.Traceable
Bases:
vspyx.Core.ResolverObject
Represents the basis of a value which can be contually monitored (traced) at runtime
- class UpdateMethods
Bases:
enum.IntEnum
Enum where members are also (and must be) ints
- AsynchronouslyUpdated = 0
- SynchronousRead = 1
- Description :str
- LongName :str
- ReadFunction :vspyx.Core.Function_1d184840f7
- UpdateMethod :Traceable.UpdateMethods
- class vspyx.Runtime.Tracer
A class which facilitates the storage of Runtime::Traces for the user
Designed to easily be tacked onto another class with multiple inheritance
Locking is all handled internally, the member functions are thread safe
- AddTrace(self, trace: Trace) Any
Manually add a Trace.
Throws a RuntimeError if the Traceable is already traced here.
- ClearTraces(self) Any
Remove all Traces traced here.
- ResolveOrNewTrace(self, traceable: Traceable, env: Environment, scheduler: Scheduler) Trace
- ResolveOrNewTrace(self, point: Point, env: Environment, scheduler: Scheduler) Trace
For the given Point, return the Trace, creating a new one if necessary.
Returns None/nullptr if the Point is not associated with a Traceable.
- class vspyx.Runtime.Unit
Bases:
vspyx.Core.ResolverObject
Represents a unit for a physical value, such as “volts” or “mph”.
This is optionally its own object, as that’s how AUTOSAR represents CompuMethod Units, however in our archicture this can also be bypassed by setting a Unit directly on the CompuMethod.
- DisplayName :str
Get the “Display Name” of the Unit, AKA the Unit String
Examples are “V” for volts, “mph”, or “1/min” for engine speed.
- OnConfigurationMutation :vspyx.Core.Callback_634bd5c449
- CloneConfiguration(self) Any
- class vspyx.Runtime.Utilization
Bases:
Component
Represents channel utilization statistics
- Signal :Signal
- AddUtilized(self, percentOfSecond: float) Any
- static New() Utilization
- static New(averageSamples: int) Utilization
- class vspyx.Runtime.Value(*args, **kwds)
Bases:
Any
Special type indicating an unconstrained type.
Any is compatible with every type.
Any assumed to have all methods.
All values assumed to be instances of Any.
Note that all the above statements are true from the point of view of static type checkers. At runtime, Any should not be used with instance or class checks.