nc::Supplier − |
#include <acsncSupplier.h> Inherits nc::Helper. Inherited by nc::RTSupplier, and nc::SimpleSupplier. |
Public Member Functions |
Supplier (const char *channelName, acscomponent::ACSComponentImpl *component, const char *acsNCDomainName=0) |
Supplier (const char *channelName, CORBA::ORB_ptr orb_mp, acscomponent::ACSComponentImpl *component, const char *acsNCDomainName=0) |
Supplier (const char *channelName, int argc, char *argv[], acscomponent::ACSComponentImpl *component, const char *acsNCDomainName=0) |
virtual void disconnect () |
void publishEvent (const CosNotification::StructuredEvent &event) |
virtual void publishEvent (const CORBA::Any &eventData) |
virtual void disconnect_structured_push_supplier () |
virtual void subscription_change (const CosNotification::EventTypeSeq &eventsAdded, const CosNotification::EventTypeSeq &eventsRemoved) |
void reconnect (::NotifyMonitoringExt::EventChannelFactory *ecf) |
void setAntennaName (std::string antennaName) |
Protected Member Functions |
virtual ~Supplier () |
void populateHeader (CosNotification::StructuredEvent &event) |
virtual void populateHeader (const CORBA::Any &any) |
void setEventType (const char *) |
void createSupplier () |
void destroyNotificationChannel () |
void init (CORBA::ORB_ptr orb) |
Protected Attributes |
CosNotifyChannelAdmin::SupplierAdmin_var SupplierAdmin_m |
CosNotifyChannelAdmin::StructuredProxyPushConsumer_var proxyConsumer_m |
CosNotifyComm::StructuredPushSupplier_var reference_m |
acscomponent::ACSComponentImpl * component_mp |
char * typeName_mp |
unsigned long long count_m |
Logging::RepeatGuardLogger< Logging::BaseLog > guardbl |
CosNotification::StructuredEvent event_m |
std::string antennaName |
Private Member Functions |
void operator= (const Supplier &) |
Supplier (const Supplier &) |
Private Attributes |
CosNotifyChannelAdmin::AdminID adminid |
CosNotifyChannelAdmin::ProxyID proxyConsumerID |
CircularQueue eventBuff |
Supplier provides an implementation of the structured event push supplier interface from the notification service (NC). It is designed to assist the developer in publishing CORBA structured events to a given channel. Instances of Supplier can contact the notification service using the Container, a SimpleClient, and various other means using the numerous constructors provided. For those who ’know what they’re doing’, Supplier can be used directly in lieu of the SimpleSupplier class to publish entire CORBA structured events (see the publishEvent() methods). This functionality should be used with extreme caution if used at all. TODO: |
• |
check for local and remote memory leaks |
|||
• |
clean-up the usage of typeName_mp somehow |
nc::Supplier::Supplier (const char * channelName, acscomponent::ACSComponentImpl * component, const char * acsNCDomainName = 0) Standard constructor - used within a component. If this constructor is used, we use container’s ORB to access Manager and then retrieve a reference to the Naming Service. |
Parameters: |
channelName The name of the channel events will be
published to. |
nc::Supplier::Supplier (const char * channelName, CORBA::ORB_ptr orb_mp, acscomponent::ACSComponentImpl * component, const char * acsNCDomainName = 0) Generic constructor. This constructor is provided for API users who create their own ORB that has a reference to the Naming Service. SimpleClient provides such access to an ORB. |
Parameters: |
channelName The name of the channel events will be
published to. |
nc::Supplier::Supplier (const char * channelName, int argc, char * argv[], acscomponent::ACSComponentImpl * component, const char * acsNCDomainName = 0) Optional constructor - used outside of ACS. This constructor is very resource intensive (it spawns it’s own ORB) and should only to be utilized when there is a reason not to use Manager to get at the Naming Service. If argc==0, default parameters (i.e., environment variables) specify how to get to the Naming Service. |
Parameters: |
channelName The name of the channel events will be
published to. acsNCDomain name of the ACS NC domain name.
This is an optional parameter. It will default to
acscommon::NAMESERVICE_BINDING_NC_DOMAIN_DEFAULT if it is
not specified. |
virtual nc::Supplier::~Supplier () [protected, virtual] Destructor is protected. |
nc::Supplier::Supplier (const Supplier &) [private] ALMA C++ coding standards state copy constructors should be disabled. |
void nc::Supplier::createSupplier () [protected] Utility method. Create the Supplier Admin; create & init the supplier. |
Returns: |
void |
Exceptions: |
ACSErrTypeCommon::CORBAProblemEx |
void nc::Supplier::destroyNotificationChannel () [protected] Utility method. Destroys a notification channel. ONLY USE THIS METHOD IF YOU KNOW FOR CERTAIN THERE IS ONLY ONE SUPPLIER FOR THE CHANNEL!!! Use with extreme caution! This method will most likely become deprecated in future releases of ACS! |
Exceptions: |
ACSErrTypeCommon::CORBAProblemEx |
Returns: |
void |
virtual void nc::Supplier::disconnect () [virtual] Called to disconnect the Supplier from the channel. Must be used instead of deleting the object. |
Reimplemented in nc::RTSupplier. |
virtual void nc::Supplier::disconnect_structured_push_supplier () [virtual] Do not under any circumstances invoke this method from your code! ACE/TAO (implementor of the Notification Service) is notorious about changing the behaviour of the underlying NC CORBA objects with each release. As of ACS 3.1, this method disconnects all consumers from the channel! |
void nc::Supplier::init (CORBA::ORB_ptr orb) [protected] Utility method. Initialization method where code common to all constructors is kept. |
Parameters: |
orb ORB which has a reference to the Naming Service. |
Exceptions: |
ACSErrTypeCommon::CORBAProblemEx |
void nc::Supplier::operator= (const Supplier &) [private] ALMA C++ coding standards state assignment operators should be disabled. |
void nc::Supplier::populateHeader (CosNotification::StructuredEvent & event) [protected] Fills the fixed header with Event Description information. |
Parameters: |
event The structured event which holds the header & data. |
Exceptions: |
ACSErrTypeCommon::CORBAProblemEx |
virtual void nc::Supplier::populateHeader (const CORBA::Any & any) [protected, virtual] Extracts the event type name from the any parameter and encodes that into the current structured event to be published. So if any contains a FRIDGE::temperatureDataBlockEvent structure, ’temperatureDataBlock’ is encoded into the type_name field of event_m. |
Exceptions: |
ACSErrTypeCommon::CORBAProblemEx |
void nc::Supplier::publishEvent (const CosNotification::StructuredEvent & event) Call this to publish an entire CORBA structured event. This is a blocking call which does not return control until the event has arrived whereever the Notification Service is actually running. Makes a call to the push_structured_event() method of consumers. |
Exceptions: |
CORBA::TRANSIENT In case that the Notification
Service is down |
Returns: |
void |
virtual void nc::Supplier::publishEvent (const CORBA::Any & eventData) [virtual] Call this to publish a CORBA Any and implicitly have the structured event ’filled-out’. It actually makes a call to the push_structured_event() method of consumers. |
Exceptions: |
CORBA::TRANSIENT In case that the Notification
Service is down |
void nc::Supplier::reconnect (::NotifyMonitoringExt::EventChannelFactory * ecf) [virtual] Override of reconnect method |
See also: |
acsnc::Helper::reconnect |
Reimplemented from nc::Helper. |
void nc::Supplier::setAntennaName (std::string antennaName) |
void nc::Supplier::setEventType (const char *) [protected] Sets the type_name field in the structured event. Method should probably be removed sometime in the near future but what impact will this have? |
Returns: |
void |
virtual void nc::Supplier::subscription_change (const CosNotification::EventTypeSeq & eventsAdded, const CosNotification::EventTypeSeq & eventsRemoved) [virtual] Called by supplier’s consumer proxy object to inform us of changes to the subscription information by the notification channel’s consumers. Essentially, this is called each time a consumer subscribes to the NC or disconnects. Do not call it from your code! |
Parameters: |
eventsAdded Event types that consumers want to
see. |
Exceptions: |
CosNotifyComm::InvalidEventType |
Returns: |
void |
CosNotifyChannelAdmin::AdminID nc::Supplier::adminid [private] |
std::string nc::Supplier::antennaName [protected] |
acscomponent::ACSComponentImpl* nc::Supplier::component_mp [protected] This is a reference to the component this supplier is contained within. The Executive subsystem has requested that the component’s name be packed into structured events and that is the reason we need this. |
unsigned long long nc::Supplier::count_m [protected] The total number of events sent from this particular supplier. |
CosNotification::StructuredEvent nc::Supplier::event_m [protected] A single structured event. This was taken out of the publishEvent() method for a small performance gain. |
CircularQueue nc::Supplier::eventBuff [private] |
Logging::RepeatGuardLogger<Logging::BaseLog> nc::Supplier::guardbl [protected] |
CosNotifyChannelAdmin::StructuredProxyPushConsumer_var nc::Supplier::proxyConsumer_m [protected] The proxy consumer object used by supplier to push events onto the NC |
CosNotifyChannelAdmin::ProxyID nc::Supplier::proxyConsumerID [private] |
CosNotifyComm::StructuredPushSupplier_var nc::Supplier::reference_m [protected] Handle destruction cleanly using our own CORBA reference. |
CosNotifyChannelAdmin::SupplierAdmin_var nc::Supplier::SupplierAdmin_m [protected] Supplier Admin object is responsible for creating & managing proxy consumers w/ a common set of QoS property settings & filter objects. |
char* nc::Supplier::typeName_mp [protected] The so-called ’type’ of the event being sent. |
Generated automatically by Doxygen for ACS-2015.2 C++ API from the source code. |