This class contains the information used for multiplexed fields. More...
#include <MultiplexingContext.h>
Public Types | |
enum | MuxContextType { NoneCtxt, CycleOccurrenceCtxt, CycleTypeCtxt } |
Category of multiplexing context. More... | |
Public Member Functions | |
virtual | ~MultiplexingContext () |
Destructor. | |
int64_t | getCycleStamp () |
Returns the time of the start-cycle event which occurs at the start of the first basic period of the given cycle. This time is expressed as a 64-bit integer counting the number of nanoseconds elapsed since the UNIX epoch i.e. since January 1st 1970 at 00.00 A.M. | |
int32_t | getCycleId () |
returns the cycle ID | |
int32_t | getTimingDomainId () |
const std::string & | getTimingDomainName () |
const std::string & | getCycleName () |
returns the cycle name as string | |
virtual void | serialize (std::ostream &stream) |
this method serializes the multiplexing context into the stream | |
const std::string & | getExtraCondition () |
returns the extra condition | |
void | setExtraCondition (const std::string &extraCondition) |
Sets the extra condition. | |
bool | match (const std::string &cycleSelector) |
Matches the context with a cycle-string argument, in order to check if the context lies within this argument. The match function is implemented by the different childs of this class. | |
bool | isforewarning () |
MuxContextType | getType () |
Retrieve the type of multiplexing context. | |
Protected Types | |
enum | accessMaskBitPattern { SET_NOT_ALLOWED = 0x00, SET_ALLOWED = 0x01, CHECK_FLAG_TO_BE_SYNC = 0x02 } |
Protected Member Functions | |
MultiplexingContext () | |
Constructor. | |
MultiplexingContext (std::istream &stream) | |
constructor | |
void | setType (MuxContextType) |
Set the type of multiplexing context. | |
void | setCycleStamp (int64_t cycleStamp) |
uint8_t | getSettingAccessMask () |
Retrieve the access mask of the context. | |
void | setSettingAccess (uint8_t accessMask) |
Set the access policy for setting field access. | |
uint8_t | getAcquisitionAccessMask () |
Retrieve the access mask for acquistion fields of the context. | |
void | setAcquisitionAccess (unsigned char accessMask) |
Set the access policy for acquisition field access. | |
Protected Attributes | |
std::string | cycleName_ |
contains the name of the cycle | |
std::string | extraCondition_ |
This condition can be used for advanced multiplexing. | |
int32_t | cycleId_ |
number that identifies the cycle | |
int64_t | cycleStamp_ |
contains a time stamp of the event start-cycle of the present cycle | |
MuxContextType | type_ |
Indicates the type of multiplexing context This information is used for the Data Integrity Later. | |
bool | forewarning_ |
Indicates that the context belongs to the next cycle, not to the current one. For example to control a slow power converter where you need to send the settings one cycle in advance, to give time to the power converter to follow the new request. | |
int32_t | timingDomainId_ |
timing domain id | |
std::string | timingDomainName_ |
timing domain name | |
uint8_t | settingAccessMask_ |
timing domain name | |
uint8_t | acquisitionAccessMask_ |
timing domain name | |
Friends | |
class | Property |
class | RollingMultiplexingManager |
class | AutomaticNotificationMessage |
class | ManualNotificationMessage |
class | SettingFieldScalar |
class | SettingFieldStruct |
class | SettingFieldArray |
class | SettingFieldScalarArray |
class | SettingFieldStructArray |
class | SettingFieldArray2D |
class | SettingFieldScalarArray2D |
class | SettingFieldStructArray2D |
class | SettingFieldString |
class | SettingFieldStringArray |
class | AcqFieldScalar |
class | AcqFieldStruct |
class | AcqFieldArray |
class | AcqFieldScalarArray |
class | AcqFieldStructArray |
class | AcqFieldArray2D |
class | AcqFieldScalarArray2D |
class | AcqFieldStructArray2D |
class | AcqFieldString |
class | AcqFieldStringArray |
This class contains the information used for multiplexed fields.
Definition at line 22 of file MultiplexingContext.h.
enum fesa::MultiplexingContext::accessMaskBitPattern [protected] |
Definition at line 156 of file MultiplexingContext.h.
Category of multiplexing context.
Definition at line 121 of file MultiplexingContext.h.
fesa::MultiplexingContext::~MultiplexingContext | ( | ) | [virtual] |
Destructor.
Definition at line 55 of file MultiplexingContext.cpp.
fesa::MultiplexingContext::MultiplexingContext | ( | ) | [protected] |
Constructor.
Definition at line 16 of file MultiplexingContext.cpp.
References fesa::AbstractEquipment::getInstance(), fesa::AbstractEquipment::isInitialized(), SET_ALLOWED, setAcquisitionAccess(), and setSettingAccess().
fesa::MultiplexingContext::MultiplexingContext | ( | std::istream & | stream | ) | [protected] |
constructor
stream | that contains the object serialized |
Definition at line 29 of file MultiplexingContext.cpp.
References acquisitionAccessMask_, cycleId_, cycleName_, cycleStamp_, extraCondition_, forewarning_, settingAccessMask_, timingDomainId_, timingDomainName_, and type_.
uint8_t fesa::MultiplexingContext::getAcquisitionAccessMask | ( | ) | [protected] |
Retrieve the access mask for acquistion fields of the context.
Definition at line 138 of file MultiplexingContext.cpp.
References acquisitionAccessMask_.
Referenced by fesa::AcqFieldArray2D< T >::set(), fesa::AcqFieldArray< T >::set(), fesa::AcqFieldStruct< T >::set(), fesa::AcqFieldScalar< T >::set(), fesa::AcqFieldStringArray::set(), fesa::AcqFieldString::set(), fesa::AcqFieldStructArray2D< T >::setCell(), fesa::AcqFieldScalarArray2D< T >::setCell(), fesa::AcqFieldStructArray< T >::setCell(), fesa::AcqFieldScalarArray< T >::setCell(), fesa::AcqFieldArray2D< T >::setColumn(), fesa::AcqFieldArray2D< T >::setRow(), and fesa::AcqFieldStringArray::setString().
int32_t fesa::MultiplexingContext::getCycleId | ( | ) | [inline] |
returns the cycle ID
Definition at line 260 of file MultiplexingContext.h.
References cycleId_.
const std::string & fesa::MultiplexingContext::getCycleName | ( | ) | [inline] |
returns the cycle name as string
Definition at line 245 of file MultiplexingContext.h.
References cycleName_.
Referenced by fesa::ServerAction< DeviceType, DataType, FilterType >::execute(), fesa::RollingMultiplexingManager::getSlot(), fesa::MultiplexingManager::getSlot(), fesa::RollingMultiplexingManager::requireSlot(), fesa::AbstractAction::triggerAllAutomaticallyTriggeredOnDemandEventSources(), fesa::AbstractAction::triggerAllOnDemandEventSources(), and fesa::AbstractAction::triggerOnDemandEventSource().
int64_t fesa::MultiplexingContext::getCycleStamp | ( | ) | [inline] |
Returns the time of the start-cycle event which occurs at the start of the first basic period of the given cycle. This time is expressed as a 64-bit integer counting the number of nanoseconds elapsed since the UNIX epoch i.e. since January 1st 1970 at 00.00 A.M.
Definition at line 250 of file MultiplexingContext.h.
References cycleStamp_.
Referenced by fesa::ServerAction< DeviceType, DataType, FilterType >::execute(), fesa::ExtendedMultiplexingManager::getBlockOffset(), fesa::RollingMultiplexingManager::getSlot(), and fesa::RollingMultiplexingManager::requireSlot().
const std::string & fesa::MultiplexingContext::getExtraCondition | ( | ) | [inline] |
returns the extra condition
Definition at line 306 of file MultiplexingContext.h.
References extraCondition_.
Referenced by fesa::ExtendedMultiplexingManager::getBlockOffset().
uint8_t fesa::MultiplexingContext::getSettingAccessMask | ( | ) | [protected] |
Retrieve the access mask of the context.
Definition at line 128 of file MultiplexingContext.cpp.
References settingAccessMask_.
Referenced by fesa::SettingFieldArray2D< T >::checkContext(), fesa::SettingFieldArray< T >::checkContext(), fesa::SettingFieldStruct< T >::checkContext(), fesa::SettingFieldArray2D< T >::get(), fesa::SettingFieldArray< T >::get(), fesa::SettingFieldStruct< T >::get(), fesa::SettingFieldScalar< T >::get(), fesa::SettingFieldStringArray::get(), fesa::SettingFieldString::get(), fesa::SettingFieldStructArray2D< T >::getCell(), fesa::SettingFieldScalarArray2D< T >::getCell(), fesa::SettingFieldStructArray< T >::getCell(), fesa::SettingFieldScalarArray< T >::getCell(), fesa::SettingFieldArray2D< T >::getColumn(), fesa::SettingFieldArray2D< T >::getRow(), fesa::SettingFieldStringArray::getString(), fesa::SettingFieldArray2D< T >::set(), fesa::SettingFieldArray< T >::set(), fesa::SettingFieldStruct< T >::set(), fesa::SettingFieldScalar< T >::set(), fesa::SettingFieldStringArray::set(), fesa::SettingFieldString::set(), fesa::SettingFieldStructArray2D< T >::setCell(), fesa::SettingFieldScalarArray2D< T >::setCell(), fesa::SettingFieldStructArray< T >::setCell(), fesa::SettingFieldScalarArray< T >::setCell(), fesa::SettingFieldArray2D< T >::setColumn(), fesa::SettingFieldArray2D< T >::setRow(), and fesa::SettingFieldStringArray::setString().
int32_t fesa::MultiplexingContext::getTimingDomainId | ( | ) | [inline] |
Definition at line 300 of file MultiplexingContext.h.
References timingDomainId_.
const std::string & fesa::MultiplexingContext::getTimingDomainName | ( | ) | [inline] |
Definition at line 294 of file MultiplexingContext.h.
References timingDomainName_.
MultiplexingContext::MuxContextType fesa::MultiplexingContext::getType | ( | ) | [inline] |
Retrieve the type of multiplexing context.
Definition at line 279 of file MultiplexingContext.h.
References type_.
Referenced by fesa::SettingFieldArray2D< T >::checkContext(), fesa::SettingFieldArray< T >::checkContext(), fesa::SettingFieldStruct< T >::checkContext(), fesa::SettingFieldArray2D< T >::get(), fesa::SettingFieldArray< T >::get(), fesa::SettingFieldStruct< T >::get(), fesa::SettingFieldScalar< T >::get(), fesa::SettingFieldStringArray::get(), fesa::SettingFieldString::get(), fesa::GenericFieldArray2D< T >::get(), fesa::GenericFieldArray< T >::get(), fesa::GenericFieldStruct< T >::get(), fesa::GenericFieldScalar< T >::get(), fesa::GenericFieldStringArray::get(), fesa::AcqFieldArray2D< T >::get(), fesa::AcqFieldArray< T >::get(), fesa::AcqFieldStruct< T >::get(), fesa::AcqFieldScalar< T >::get(), fesa::AcqFieldStringArray::get(), fesa::AbstractField::getAsString(), fesa::SettingFieldStructArray2D< T >::getCell(), fesa::SettingFieldScalarArray2D< T >::getCell(), fesa::SettingFieldStructArray< T >::getCell(), fesa::SettingFieldScalarArray< T >::getCell(), fesa::GenericFieldStructArray2D< T >::getCell(), fesa::GenericFieldScalarArray2D< T >::getCell(), fesa::GenericFieldStructArray< T >::getCell(), fesa::GenericFieldScalarArray< T >::getCell(), fesa::AcqFieldStructArray2D< T >::getCell(), fesa::AcqFieldScalarArray2D< T >::getCell(), fesa::AcqFieldStructArray< T >::getCell(), fesa::AcqFieldScalarArray< T >::getCell(), fesa::SettingFieldArray2D< T >::getColumn(), fesa::GenericFieldArray2D< T >::getColumn(), fesa::AcqFieldArray2D< T >::getColumn(), fesa::SettingFieldStruct< T >::getPending(), fesa::SettingFieldScalar< T >::getPending(), fesa::SettingFieldArray2D< T >::getRow(), fesa::GenericFieldArray2D< T >::getRow(), fesa::AcqFieldArray2D< T >::getRow(), fesa::FieldStringArray::getSize(), fesa::SettingFieldStringArray::getString(), fesa::GenericFieldStringArray::getString(), fesa::AcqFieldStringArray::getString(), fesa::SettingFieldStruct< T >::set(), fesa::SettingFieldScalar< T >::set(), fesa::SettingFieldStringArray::set(), fesa::SettingFieldString::set(), fesa::GenericFieldArray2D< T >::set(), fesa::GenericFieldArray< T >::set(), fesa::GenericFieldStruct< T >::set(), fesa::GenericFieldScalar< T >::set(), fesa::GenericFieldStringArray::set(), fesa::GenericFieldString::set(), fesa::AcqFieldArray2D< T >::set(), fesa::AcqFieldArray< T >::set(), fesa::AcqFieldStruct< T >::set(), fesa::AcqFieldScalar< T >::set(), fesa::AcqFieldStringArray::set(), fesa::AcqFieldString::set(), fesa::GenericFieldStructArray2D< T >::setCell(), fesa::GenericFieldScalarArray2D< T >::setCell(), fesa::GenericFieldStructArray< T >::setCell(), fesa::GenericFieldScalarArray< T >::setCell(), fesa::AcqFieldStructArray2D< T >::setCell(), fesa::AcqFieldScalarArray2D< T >::setCell(), fesa::AcqFieldStructArray< T >::setCell(), fesa::AcqFieldScalarArray< T >::setCell(), fesa::GenericFieldArray2D< T >::setColumn(), fesa::AcqFieldArray2D< T >::setColumn(), fesa::GenericFieldArray2D< T >::setRow(), fesa::AcqFieldArray2D< T >::setRow(), fesa::SettingFieldStringArray::setString(), fesa::GenericFieldStringArray::setString(), fesa::AcqFieldStringArray::setString(), and fesa::DataStore::synchronizeSettingFields().
bool fesa::MultiplexingContext::isforewarning | ( | ) | [inline] |
Definition at line 289 of file MultiplexingContext.h.
References forewarning_.
bool fesa::MultiplexingContext::match | ( | const std::string & | cycleSelector | ) | [inline] |
Matches the context with a cycle-string argument, in order to check if the context lies within this argument. The match function is implemented by the different childs of this class.
cycleSelector | the cycleSelector to match |
Definition at line 265 of file MultiplexingContext.h.
References CycleOccurrenceCtxt, CycleTypeCtxt, and type_.
Referenced by fesa::ExtendedMultiplexingManager::getBlockOffset(), and fesa::SubscriptionCycle::matchContext().
void fesa::MultiplexingContext::serialize | ( | std::ostream & | stream | ) | [virtual] |
this method serializes the multiplexing context into the stream
Definition at line 60 of file MultiplexingContext.cpp.
References acquisitionAccessMask_, cycleId_, cycleName_, cycleStamp_, extraCondition_, forewarning_, fesa::NUMBER_SEPARATOR, settingAccessMask_, fesa::STRING_SEPARATOR, timingDomainId_, timingDomainName_, and type_.
Referenced by fesa::ManualNotificationMessage::serialize(), and fesa::AutomaticNotificationMessage::serialize().
void fesa::MultiplexingContext::setAcquisitionAccess | ( | unsigned char | accessMask | ) | [protected] |
Set the access policy for acquisition field access.
acquisitonAccessMask | bit pattern defining the acquisition access policy |
Definition at line 143 of file MultiplexingContext.cpp.
References acquisitionAccessMask_.
Referenced by fesa::Property::get(), MultiplexingContext(), and fesa::Property::set().
void fesa::MultiplexingContext::setCycleStamp | ( | int64_t | cycleStamp | ) | [inline, protected] |
Definition at line 255 of file MultiplexingContext.h.
References cycleStamp_.
Referenced by fesa::RollingMultiplexingManager::getSlot().
void fesa::MultiplexingContext::setExtraCondition | ( | const std::string & | extraCondition | ) |
Sets the extra condition.
extraCondition | The condition to set |
This | function can throw different FesaExceptions |
Definition at line 107 of file MultiplexingContext.cpp.
References fesa::CycleSelector::criterion_, fesa::CycleDescriptor::CycleDescriptor(), fesa::CycleSelector::domain_, extraCondition_, FesaErrorNotValidExtraCondition, fesa::SynchronizationFactory::getCycleDescriptor(), fesa::SynchronizationLabObjectFactory::getInstance(), and fesa::parseCycleSelector().
Referenced by fesa::Property::get(), and fesa::Property::set().
void fesa::MultiplexingContext::setSettingAccess | ( | uint8_t | accessMask | ) | [protected] |
Set the access policy for setting field access.
accessMask | bit pattern defining the setting access policy |
Definition at line 133 of file MultiplexingContext.cpp.
References settingAccessMask_.
Referenced by fesa::Property::get(), MultiplexingContext(), and fesa::Property::set().
void fesa::MultiplexingContext::setType | ( | MultiplexingContext::MuxContextType | type | ) | [inline, protected] |
Set the type of multiplexing context.
Definition at line 284 of file MultiplexingContext.h.
References type_.
friend class AcqFieldArray [friend] |
Definition at line 40 of file MultiplexingContext.h.
friend class AcqFieldArray2D [friend] |
Definition at line 43 of file MultiplexingContext.h.
friend class AcqFieldScalar [friend] |
Definition at line 38 of file MultiplexingContext.h.
friend class AcqFieldScalarArray [friend] |
Definition at line 41 of file MultiplexingContext.h.
friend class AcqFieldScalarArray2D [friend] |
Definition at line 44 of file MultiplexingContext.h.
friend class AcqFieldString [friend] |
Definition at line 46 of file MultiplexingContext.h.
friend class AcqFieldStringArray [friend] |
Definition at line 47 of file MultiplexingContext.h.
friend class AcqFieldStruct [friend] |
Definition at line 39 of file MultiplexingContext.h.
friend class AcqFieldStructArray [friend] |
Definition at line 42 of file MultiplexingContext.h.
friend class AcqFieldStructArray2D [friend] |
Definition at line 45 of file MultiplexingContext.h.
friend class AutomaticNotificationMessage [friend] |
Definition at line 26 of file MultiplexingContext.h.
friend class ManualNotificationMessage [friend] |
Definition at line 27 of file MultiplexingContext.h.
friend class Property [friend] |
Definition at line 24 of file MultiplexingContext.h.
friend class RollingMultiplexingManager [friend] |
Definition at line 25 of file MultiplexingContext.h.
friend class SettingFieldArray [friend] |
Definition at line 30 of file MultiplexingContext.h.
friend class SettingFieldArray2D [friend] |
Definition at line 33 of file MultiplexingContext.h.
friend class SettingFieldScalar [friend] |
Definition at line 28 of file MultiplexingContext.h.
friend class SettingFieldScalarArray [friend] |
Definition at line 31 of file MultiplexingContext.h.
friend class SettingFieldScalarArray2D [friend] |
Definition at line 34 of file MultiplexingContext.h.
friend class SettingFieldString [friend] |
Definition at line 36 of file MultiplexingContext.h.
friend class SettingFieldStringArray [friend] |
Definition at line 37 of file MultiplexingContext.h.
friend class SettingFieldStruct [friend] |
Definition at line 29 of file MultiplexingContext.h.
friend class SettingFieldStructArray [friend] |
Definition at line 32 of file MultiplexingContext.h.
friend class SettingFieldStructArray2D [friend] |
Definition at line 35 of file MultiplexingContext.h.
uint8_t fesa::MultiplexingContext::acquisitionAccessMask_ [protected] |
timing domain name
Definition at line 238 of file MultiplexingContext.h.
Referenced by getAcquisitionAccessMask(), MultiplexingContext(), serialize(), and setAcquisitionAccess().
int32_t fesa::MultiplexingContext::cycleId_ [protected] |
number that identifies the cycle
Definition at line 200 of file MultiplexingContext.h.
Referenced by getCycleId(), MultiplexingContext(), serialize(), and fesa::TimingContext::TimingContext().
std::string fesa::MultiplexingContext::cycleName_ [protected] |
contains the name of the cycle
Definition at line 190 of file MultiplexingContext.h.
Referenced by getCycleName(), MultiplexingContext(), serialize(), and fesa::TimingContext::TimingContext().
int64_t fesa::MultiplexingContext::cycleStamp_ [protected] |
contains a time stamp of the event start-cycle of the present cycle
Definition at line 205 of file MultiplexingContext.h.
Referenced by getCycleStamp(), MultiplexingContext(), serialize(), and setCycleStamp().
std::string fesa::MultiplexingContext::extraCondition_ [protected] |
This condition can be used for advanced multiplexing.
Definition at line 195 of file MultiplexingContext.h.
Referenced by getExtraCondition(), MultiplexingContext(), serialize(), and setExtraCondition().
bool fesa::MultiplexingContext::forewarning_ [protected] |
Indicates that the context belongs to the next cycle, not to the current one. For example to control a slow power converter where you need to send the settings one cycle in advance, to give time to the power converter to follow the new request.
Definition at line 218 of file MultiplexingContext.h.
Referenced by isforewarning(), MultiplexingContext(), and serialize().
uint8_t fesa::MultiplexingContext::settingAccessMask_ [protected] |
timing domain name
Definition at line 233 of file MultiplexingContext.h.
Referenced by getSettingAccessMask(), MultiplexingContext(), serialize(), and setSettingAccess().
int32_t fesa::MultiplexingContext::timingDomainId_ [protected] |
timing domain id
Definition at line 223 of file MultiplexingContext.h.
Referenced by getTimingDomainId(), MultiplexingContext(), and serialize().
std::string fesa::MultiplexingContext::timingDomainName_ [protected] |
timing domain name
Definition at line 228 of file MultiplexingContext.h.
Referenced by getTimingDomainName(), MultiplexingContext(), and serialize().
MuxContextType fesa::MultiplexingContext::type_ [protected] |
Indicates the type of multiplexing context This information is used for the Data Integrity Later.
Definition at line 211 of file MultiplexingContext.h.
Referenced by getType(), match(), MultiplexingContext(), fesa::NoneContext::NoneContext(), serialize(), setType(), and fesa::TimingContext::TimingContext().