cut 3.3.0
Loading...
Searching...
No Matches
taurusmalps.taurusmalpsattribute.MalPSSubscription Class Reference

Interface implemenation for MAL PS Subscriptions. More...

Public Member Functions

 __init__ (self, _uri, _data_entity_class, _qos, _parent_attribute)
 Initializes the MalPSSubscription object.
 
 change_state (self, new_state)
 Changes the state self.is_done flag which is used by the class to determine if subsription is still active and thus if arrived data should be processed.
 
 new_value (self, value, int timestamp_src)
 Handles new values comming from MAL publisher.
 
 run (self)
 Gets instance of CiiFactory and gets a subscriber instance from it.
 

Detailed Description

Interface implemenation for MAL PS Subscriptions.

An instance of this object can monitor one topic.

Constructor & Destructor Documentation

◆ __init__()

taurusmalps.taurusmalpsattribute.MalPSSubscription.__init__ ( self,
_uri,
_data_entity_class,
_qos,
_parent_attribute )

Initializes the MalPSSubscription object.

Saves a weak reference to the attribute. Weak references do not increase reference counter and we can query if the reference object still exists. Since there is no assurance that new_value() will not be called after we unsubscribe, we need a mechanism to avoid calling objects that are already destroyed.

Parameters
attribute(TaurusCiiAttribute) Attribute that is notified of the new value

Member Function Documentation

◆ change_state()

taurusmalps.taurusmalpsattribute.MalPSSubscription.change_state ( self,
new_state )

Changes the state self.is_done flag which is used by the class to determine if subsription is still active and thus if arrived data should be processed.

Parameters
new_stateThe new state value

◆ new_value()

taurusmalps.taurusmalpsattribute.MalPSSubscription.new_value ( self,
value,
int timestamp_src )

Handles new values comming from MAL publisher.

Parameters
valueThe new value
timestamp_srcThe value timestamp

◆ run()

taurusmalps.taurusmalpsattribute.MalPSSubscription.run ( self)

Gets instance of CiiFactory and gets a subscriber instance from it.

Starts the actual thread that receives published data


The documentation for this class was generated from the following file: