本文整理汇总了C++中cosnotification::EventTypeSeq类的典型用法代码示例。如果您正苦于以下问题:C++ EventTypeSeq类的具体用法?C++ EventTypeSeq怎么用?C++ EventTypeSeq使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了EventTypeSeq类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: reactor
ConstraintArbiter::ConstraintArbiter(ACE_Reactor &ar_,
DifferentialMotion_ptr _pMotion,
StructuredPushSupplier * _pSupplier) :
pMotion_(DifferentialMotion::_duplicate(_pMotion)),
pSupplier_(_pSupplier),
reactor(ar_),
timerId(-1),
skipDebug_(0),
skipMax_(4)
{
MIRO_LOG_CTOR("Miro::ConstraintArbiter");
currentVelocity_.translation = 0;
currentVelocity_.rotation = 0.;
if (pSupplier_) {
// Status Notify Event initialization
notifyEvent_.header.fixed_header.event_type.domain_name =
CORBA::string_dup(pSupplier_->domainName().c_str());
notifyEvent_.header.fixed_header.event_type.type_name =
CORBA::string_dup("ConstraintArbiter");
// offer declaration
CosNotification::EventTypeSeq offers;
offers.length(1);
offers[0] = notifyEvent_.header.fixed_header.event_type;
StructuredPushSupplier::IndexVector v =
pSupplier_->addOffers(offers);
offerIndex_ = v[0];
}
}
开发者ID:BackupTheBerlios,项目名称:miro-middleware-svn,代码行数:33,代码来源:ConstraintArbiter.cpp
示例2: added
void
Notify_Structured_Push_Consumer::_connect (
CosNotifyChannelAdmin::ConsumerAdmin_ptr consumer_admin)
{
CosNotifyComm::StructuredPushConsumer_var objref = this->_this ();
CosNotifyChannelAdmin::ProxySupplier_var proxysupplier =
consumer_admin->obtain_notification_push_supplier (
CosNotifyChannelAdmin::STRUCTURED_EVENT,
proxy_id_);
this->proxy_ =
CosNotifyChannelAdmin::StructuredProxyPushSupplier::_narrow (
proxysupplier.in ());
this->proxy_->connect_structured_push_consumer (objref.in ());
CosNotification::EventTypeSeq added (1);
CosNotification::EventTypeSeq removed (1);
added.length (1);
removed.length (1);
added[0].domain_name = CORBA::string_dup ("*");
added[0].type_name = CORBA::string_dup ("examples");
removed[0].domain_name = CORBA::string_dup ("*");
removed[0].type_name = CORBA::string_dup ("*");
this->subscription_change (added, removed);
// give ownership to POA
this->_remove_ref ();
}
开发者ID:asdlei00,项目名称:ACE,代码行数:33,代码来源:Notify_Structured_Push_Consumer.cpp
示例3: connection
EventHandler::EventHandler(Connection& _connection,
Miro::StructuredPushSupplier& _supplier) :
connection(_connection),
supplier_(_supplier),
buttonStatus(0x00),
blinkOn(false)
{
DBG(cout << "Constructing B21Buttons::EventHandler" << endl);
// init button states
for (unsigned long i = 0; i < NUM_BUTTONS; ++i) {
button[i].number = i;
button[i].event = Miro::Button::ON_RELEASE;
button[i].mode = Miro::B21Button::TOGGLE_OFF;
}
// Status Notify Event initialization
notifyEvent.header.fixed_header.event_type.domain_name =
CORBA::string_dup(supplier_.domainName().c_str());
notifyEvent.header.fixed_header.event_type.type_name =
CORBA::string_dup("Button");
notifyEvent.header.fixed_header.event_name = CORBA::string_dup("");
notifyEvent.header.variable_header.length(0); // put nothing here
notifyEvent.filterable_data.length(0); // put nothing here
CosNotification::EventTypeSeq offers;
offers.length(1);
offers[0] = notifyEvent.header.fixed_header.event_type;
supplier_.addOffers(offers);
}
开发者ID:BackupTheBerlios,项目名称:miro-middleware-svn,代码行数:30,代码来源:ButtonsEventHandler.cpp
示例4: init
void FilterDistanceScan::init(Miro::Server& _server, FilterParameters const * _params){
std::cout << "FilterDistanceScan" << std::endl;
if(pSupplier_ == NULL){
ec_ = _server.resolveName<EventChannel>("EventChannel");
pSupplier_ = new Miro::StructuredPushSupplier(ec_.in(), _server.namingContextName.c_str(), false);
}
if(pSupplier_ != NULL){
notifyEvent_.header.fixed_header.event_type.domain_name =
CORBA::string_dup(pSupplier_->domainName().c_str());
notifyEvent_.header.fixed_header.event_type.type_name =
CORBA::string_dup("OmniDistance");
notifyEvent_.header.fixed_header.event_name = CORBA::string_dup("");
notifyEvent_.header.variable_header.length(0); // put nothing here
notifyEvent_.filterable_data.length(0); // put nothing here
CosNotification::EventTypeSeq offers;
offers.length(1);
offers[0] = notifyEvent_.header.fixed_header.event_type;
pSupplier_->addOffers(offers);
pSupplier_->connect();
this->connect();
}
Super::init(_server, _params);
}
开发者ID:BackupTheBerlios,项目名称:miro-middleware-svn,代码行数:34,代码来源:VideoFilterDistanceScan.cpp
示例5: qos
void
TAO_Notify_ThreadPool_Consumer::connect (void)
{
// Activate the consumer with the default_POA_
CosNotifyComm::StructuredPushConsumer_var objref = this->_this ();
CosNotifyChannelAdmin::ProxySupplier_var proxysupplier;
if (this->proxy_supplier_thread_count_ != 0)
{
// Narrow to the extended interface.
NotifyExt::ConsumerAdmin_var admin_ext = NotifyExt::ConsumerAdmin::_narrow (this->admin_.in ());
NotifyExt::ThreadPoolParams tp_params = { NotifyExt::CLIENT_PROPAGATED, 0,
0, static_cast<CORBA::ULong> (this->proxy_supplier_thread_count_),
0, 0, 0, 0, 0 };
CosNotification::QoSProperties qos (1);
qos.length (1);
qos[0].name = CORBA::string_dup (NotifyExt::ThreadPool);
qos[0].value <<= tp_params;
// Obtain the proxy. The QoS is applied to the POA in which the Proxy is hosted.
proxysupplier = admin_ext->obtain_notification_push_supplier_with_qos (CosNotifyChannelAdmin::STRUCTURED_EVENT
, proxy_supplier_id_, qos);
}
else
{
proxysupplier = this->admin_->obtain_notification_push_supplier (CosNotifyChannelAdmin::STRUCTURED_EVENT
, proxy_supplier_id_);
}
ACE_ASSERT (!CORBA::is_nil (proxysupplier.in ()));
// narrow
this->proxy_supplier_ =
CosNotifyChannelAdmin::StructuredProxyPushSupplier::_narrow (proxysupplier.in ());
ACE_ASSERT (!CORBA::is_nil (proxy_supplier_.in ()));
this->proxy_supplier_->connect_structured_push_consumer (objref.in ());
// Call subscription_change to inform the supplier that this consumer is available.
CosNotification::EventTypeSeq added (1);
CosNotification::EventTypeSeq removed;
added.length (1);
added[0].domain_name = CORBA::string_dup ("TEST_DOMAIN");
/* We generate a unique Id for the consumer type so that the supplier can distinguish between the consumers.*/
char type[BUFSIZ];
ACE_OS::sprintf (type, "TEST_TYPE_%d", this->proxy_supplier_id_);
added[0].type_name = CORBA::string_dup (type);
this->proxy_supplier_->subscription_change (added, removed);
ACE_DEBUG ((LM_DEBUG, "(%P,%t) Created Consumer %d with %d threads at the ProxySupplier\n", proxy_supplier_id_,
this->proxy_supplier_thread_count_));
}
开发者ID:asdlei00,项目名称:ACE,代码行数:60,代码来源:Consumer.cpp
示例6: if
void
TAO_Notify_Tests_Options_Parser::execute (CosNotification::EventTypeSeq& added, CosNotification::EventTypeSeq& removed, ACE_Arg_Shifter& arg_shifter)
{
const ACE_TCHAR* current_arg = 0;
while (arg_shifter.is_anything_left ())
{
current_arg = arg_shifter.get_current ();
arg_shifter.consume_arg ();
if (current_arg[0] == '+')
{
// create 1 more space.
int seq_ln = added.length ();
added.length (seq_ln + 1);
added[seq_ln].domain_name = CORBA::string_dup ("*");
added[seq_ln].type_name = CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR(++current_arg)); // Skip the '+' sign.
}
else if (current_arg[0] == '-')
{
// create 1 more space.
int seq_ln = removed.length ();
removed.length (seq_ln + 1);
removed[seq_ln].domain_name = CORBA::string_dup ("*");
removed[seq_ln].type_name = CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR(++current_arg)); // Skip the '-' sign.
}
}
}
开发者ID:asdlei00,项目名称:ACE,代码行数:30,代码来源:Options_Parser.cpp
示例7:
RangeSensorDispatcher::RangeSensorDispatcher(const ScanDescriptionIDL& _description,
StructuredPushSupplier * _supplier) :
supplier_(_supplier),
mutex_(),
cond_(mutex_),
notifyEvent_(1),
eventPending_(1, false)
{
if (supplier_) {
if (_description.scanType == RangeSensor::GROUPWISE) {
notifyEvent_.resize(_description.group.length());
eventPending_.resize(_description.group.length(), false);
}
for (unsigned int i = 0; i < notifyEvent_.size(); ++i) {
// Notify Event initialization
notifyEvent_[i].header.fixed_header.event_type.domain_name =
CORBA::string_dup(supplier_->domainName().c_str());
notifyEvent_[i].header.fixed_header.event_type.type_name =
CORBA::string_dup(_description.eventName);
notifyEvent_[i].header.fixed_header.event_name = CORBA::string_dup("");
notifyEvent_[i].header.variable_header.length(0); // put nothing here
notifyEvent_[i].filterable_data.length(0); // put nothing here
}
// offer declaration
CosNotification::EventTypeSeq offers;
offers.length(1);
offers[0] = notifyEvent_[0].header.fixed_header.event_type;
supplier_->addOffers(offers);
}
}
开发者ID:BackupTheBerlios,项目名称:miro-middleware-svn,代码行数:32,代码来源:RangeSensorImpl.cpp
示例8: offer_change
void offer_change(CosNotification::EventTypeSeq const& added,
CosNotification::EventTypeSeq const& removed)
throw(CosNotifyComm::InvalidEventType)
{
cerr << endl << endl << "offer_change() called" << endl;
if (added.length() > 0) {
cout << "added: " << endl;
for (CORBA::ULong i = 0; i < added.length(); ++i) {
cout << " domain name: "
<< added[i].domain_name
<< " "
<< "type name: "
<< added[i].type_name << endl;
}
}
if (removed.length() > 0) {
cout << "removed: " << endl;
for (CORBA::ULong i = 0; i < removed.length(); ++i) {
cout << " domain name: "
<< removed[i].domain_name
<< " "
<< "type name: "
<< removed[i].type_name << endl;
}
}
}
开发者ID:BackupTheBerlios,项目名称:miro-middleware-svn,代码行数:27,代码来源:offer_change.cpp
示例9:
void
Updates::add_type (CosNotification::EventTypeSeq& type_seq, const char* type)
{
// Make space.
int index = type_seq.length ();
type_seq.length (index + 1);
type_seq[index].domain_name = CORBA::string_dup (type);
type_seq[index].type_name = CORBA::string_dup (type);
}
开发者ID:OspreyHub,项目名称:ATCD,代码行数:10,代码来源:Updates.cpp
示例10: setSubscriptions
void
StructuredPushConsumer::setSingleSubscription(std::string const& _domain,
std::string const& _type)
{
CosNotification::EventTypeSeq subscriptions;
subscriptions.length(1);
subscriptions[0].domain_name = CORBA::string_dup(_domain.c_str());
subscriptions[0].type_name = CORBA::string_dup(_type.c_str());
setSubscriptions(subscriptions);
}
开发者ID:BackupTheBerlios,项目名称:miro-middleware-svn,代码行数:11,代码来源:StructuredPushConsumer.cpp
示例11: guard
/**
* The consumer will register the subscriptions at its event consumer admin.
* The admin will make sure, the notification channel suppliers are informed
* about new subscription. That way, suppliers can query whether the events they
* offer are currently subscribed by any supplier.
*
* Internally the consumer keeps track of the events offered by suppliers.
* A user of the consumer can query at the consumer for each subscribed event,
* wheter it is offered by any supplier or not. This way an event sink
* can determine whether the demanded information is produced by the system.
*
* For efficient querying of offer/subscription matches, this method returns a
* vector containing a handle for each added subscription. This handle can be used
* for efficient querying of the availability of suppliers for a
* particular event type vie the offered method.
*/
StructuredPushConsumer::IndexVector
StructuredPushConsumer::addSubscriptons(CosNotification::EventTypeSeq const& _added)
{
Guard guard(connectedMutex_);
CORBA::ULong subscriptionsLen = subscriptions_.length();
CORBA::ULong addedLen = _added.length();
CORBA::ULong newSubscriptionsLen = subscriptionsLen;
// assigned indexes
IndexVector indexes(addedLen);
// actually added events
CosNotification::EventTypeSeq added;
// dummy: allway empty
CosNotification::EventTypeSeq removed;
// enlarge the offers vector by the maximum required size
subscriptions_.length(subscriptionsLen + addedLen);
added.length(addedLen);
for (unsigned int i = 0; i < addedLen; ++i) {
unsigned int j = 0;
for (; j < subscriptionsLen; ++j) {
// search whether already offered
if (strcmp(subscriptions_[j].type_name, _added[i].type_name) == 0 &&
strcmp(subscriptions_[j].domain_name, _added[i].domain_name) == 0) {
indexes[i] = j;
break;
}
}
// add new offer to list of offers
if (j == subscriptionsLen) {
subscriptions_[newSubscriptionsLen] = _added[i];
added[newSubscriptionsLen - subscriptionsLen] = _added[i];
indexes[i] = newSubscriptionsLen;
++newSubscriptionsLen;
}
}
// resize offers vector to actual size
subscriptions_.length(newSubscriptionsLen);
added.length(newSubscriptionsLen - subscriptionsLen);
initiateSubscriptionChange(added, removed);
return indexes;
}
开发者ID:BackupTheBerlios,项目名称:miro-middleware-svn,代码行数:64,代码来源:StructuredPushConsumer.cpp
示例12: properties
void
Notify_Structured_Push_Consumer::_connect (
CosNotifyChannelAdmin::ConsumerAdmin_ptr consumer_admin)
{
#ifdef TEST_QOS_MAX_EVENTS_PER_CONSUMER
CosNotification::QoSProperties properties (8);
properties.length (2);
CORBA::ULong idx = 0;
properties[idx].name = CORBA::string_dup (CosNotification::DiscardPolicy);
properties[idx].value <<= this->CosNotification::FifoOrder;
idx += 1;
properties[idx].name = CORBA::string_dup (CosNotification::MaxEventsPerConsumer);
properties[idx].value <<= 500;
idx += 1;
ACE_OS::printf("Setting %d::%d QoS properties in Admin.\n", (int)idx, (int)properties.length());
consumer_admin->set_qos (properties);
#endif // TEST_QOS_MAX_EVENTS_PER_CONSUMER
CosNotifyComm::StructuredPushConsumer_var objref = this->_this ();
CosNotifyChannelAdmin::ProxySupplier_var proxysupplier =
consumer_admin->obtain_notification_push_supplier (
CosNotifyChannelAdmin::STRUCTURED_EVENT,
proxy_id_);
this->proxy_ =
CosNotifyChannelAdmin::StructuredProxyPushSupplier::_narrow (
proxysupplier.in ());
this->proxy_->connect_structured_push_consumer (objref.in ());
CosNotification::EventTypeSeq added (1);
CosNotification::EventTypeSeq removed (1);
added.length (1);
removed.length (1);
added[0].domain_name = CORBA::string_dup ("*");
added[0].type_name = CORBA::string_dup ("examples");
removed[0].domain_name = CORBA::string_dup ("*");
removed[0].type_name = CORBA::string_dup ("*");
this->subscription_change (added, removed);
// give ownership to POA
this->_remove_ref ();
}
开发者ID:asdlei00,项目名称:ACE,代码行数:47,代码来源:Notify_Structured_Push_Consumer.cpp
示例13: in
void
Updates::print_event_types (const CosNotification::EventTypeSeq &types)
{
for (CORBA::ULong i = 0; i < types.length (); ++i)
{
ACE_DEBUG ((LM_DEBUG, "(%s, %s)\n", types[i].domain_name.in (), types[i].type_name. in()));
}
}
开发者ID:OspreyHub,项目名称:ATCD,代码行数:8,代码来源:Updates.cpp
示例14: throw
void
subscription_change(CosNotification::EventTypeSeq const& added,
CosNotification::EventTypeSeq const& removed)
throw()
{
for (CORBA::ULong i = 0; i < added.length(); ++i) {
cout << "subscription_change() - added: domain name="
<< added[i].domain_name
<< " type name="
<< added[i].type_name << endl;
}
for (CORBA::ULong i = 0; i < removed.length(); ++i) {
cout << "subscription_change() - removed: domain name="
<< removed[i].domain_name
<< " type name="
<< removed[i].type_name << endl;
}
}
开发者ID:BackupTheBerlios,项目名称:miro-middleware-svn,代码行数:18,代码来源:offer_subscribe.cpp
示例15:
void
TAO_Notify_EventTypeSeq::remove_seq (const CosNotification::EventTypeSeq& event_type_seq)
{
TAO_Notify_EventType event_type;
for (CORBA::ULong i = 0; i < event_type_seq.length (); ++i)
{
event_type = event_type_seq[i];
inherited::remove (event_type);
}
}
开发者ID:binary42,项目名称:OCI,代码行数:11,代码来源:EventTypeSeq.cpp
示例16:
OdometryDispatcher::OdometryDispatcher(StructuredPushSupplier * _supplier,
bool _rawPositionEvents) :
supplier_(_supplier),
rawPositionEvents_(_rawPositionEvents),
mutex_(),
cond_(mutex_)
{
if (supplier_) {
// Status Notify Event initialization
notifyEvent_.header.fixed_header.event_type.domain_name =
CORBA::string_dup(supplier_->domainName().c_str());
notifyEvent_.header.fixed_header.event_type.type_name =
CORBA::string_dup("Odometry");
notifyEvent_.header.fixed_header.event_name = CORBA::string_dup("");
notifyEvent_.header.variable_header.length(0); // put nothing here
notifyEvent_.filterable_data.length(0); // put nothing here
if (rawPositionEvents_) {
// Status Notify Raw Event initialization
notifyRawEvent_.header.fixed_header.event_type.domain_name =
CORBA::string_dup(supplier_->domainName().c_str());
notifyRawEvent_.header.fixed_header.event_type.type_name =
CORBA::string_dup("RawPosition");
notifyRawEvent_.header.fixed_header.event_name = CORBA::string_dup("");
notifyRawEvent_.header.variable_header.length(0); // put nothing here
notifyRawEvent_.filterable_data.length(0); // put nothing here
}
CosNotification::EventTypeSeq offers;
offers.length((rawPositionEvents_)? 2 : 1);
offers[0] = notifyEvent_.header.fixed_header.event_type;
if (rawPositionEvents_) {
offers[1] = notifyRawEvent_.header.fixed_header.event_type;
}
StructuredPushSupplier::IndexVector eventId = supplier_->addOffers(offers);
for (unsigned int i = 0; i < eventId.size(); ++i) {
eventId_[i] = eventId[i];
}
}
}
开发者ID:BackupTheBerlios,项目名称:miro-middleware-svn,代码行数:41,代码来源:OdometryImpl.cpp
示例17:
CompassDispatcher::CompassDispatcher(StructuredPushSupplier * _supplier) :
supplier_(_supplier),
mutex_(),
cond_(mutex_)
{
if (supplier_) {
// Status Notify Event initialization
notifyEvent_.header.fixed_header.event_type.domain_name =
CORBA::string_dup(supplier_->domainName().c_str());
notifyEvent_.header.fixed_header.event_type.type_name =
CORBA::string_dup("Compass");
notifyEvent_.header.fixed_header.event_name = CORBA::string_dup("");
notifyEvent_.header.variable_header.length(0); // put nothing here
notifyEvent_.filterable_data.length(0); // put nothing here
CosNotification::EventTypeSeq offers;
offers.length(1);
offers[0] = notifyEvent_.header.fixed_header.event_type;
supplier_->addOffers(offers);
}
}
开发者ID:BackupTheBerlios,项目名称:miro-middleware-svn,代码行数:21,代码来源:CompassImpl.cpp
示例18:
/**
* @param _pMotion a pointer to the motion interface
* @param _pSupplier a pointer to a StructuredPushSupplier for
* emitting arbitration events for debugging.
*/
MotionArbiter::MotionArbiter(Motion_ptr _pMotion,
StructuredPushSupplier * _pSupplier) :
pMotion_(Motion::_duplicate(_pMotion)),
pSupplier_(_pSupplier)
{
currentVelocity_.translation = 0;
currentVelocity_.rotation = 0.;
if (pSupplier_) {
// Status Notify Event initialization
notifyEvent.header.fixed_header.event_type.domain_name =
CORBA::string_dup(pSupplier_->domainName().c_str());
notifyEvent.header.fixed_header.event_type.type_name =
CORBA::string_dup("ArbitrateChange");
CosNotification::EventTypeSeq offers;
offers.length(1);
offers[0] = notifyEvent.header.fixed_header.event_type;
pSupplier_->addOffers(offers);
}
}
开发者ID:BackupTheBerlios,项目名称:miro-middleware-svn,代码行数:26,代码来源:MotionArbiter.cpp
示例19: iter
void
TAO_Notify_EventTypeSeq::populate (CosNotification::EventTypeSeq& event_type_seq) const
{
event_type_seq.length (static_cast<CORBA::ULong> (this->size ()));
inherited::CONST_ITERATOR iter (*this);
TAO_Notify_EventType* event_type = 0;
CORBA::ULong i = 0;
for (iter.first (); iter.next (event_type); iter.advance (), ++i)
event_type_seq[i] = event_type->native ();
}
开发者ID:binary42,项目名称:OCI,代码行数:13,代码来源:EventTypeSeq.cpp
示例20: pSupplier
StallImpl::StallImpl(BaseConnection * _connection,
Miro::StructuredPushSupplier * _pSupplier) :
connection_(_connection),
pSupplier(_pSupplier)
{
MIRO_LOG_CTOR("Sparrow::StallImpl");
// Stall Notify Event initialization
if (pSupplier) {
notifyEvent.header.fixed_header.event_type.domain_name =
CORBA::string_dup(pSupplier->domainName().c_str());
notifyEvent.header.fixed_header.event_type.type_name =
CORBA::string_dup("Stall");
notifyEvent.header.fixed_header.event_name = CORBA::string_dup("");
notifyEvent.header.variable_header.length(0); // put nothing here
notifyEvent.filterable_data.length(0); // put nothing here
CosNotification::EventTypeSeq offers;
offers.length(1);
offers[0] = notifyEvent.header.fixed_header.event_type;
pSupplier->addOffers(offers);
}
}
开发者ID:BackupTheBerlios,项目名称:miro-middleware-svn,代码行数:23,代码来源:SparrowStallImpl.cpp
注:本文中的cosnotification::EventTypeSeq类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论