event_con.h
来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C头文件 代码 · 共 75 行
H
75 行
// Event_Con.h,v 1.7 2002/01/29 20:20:42 okellogg Exp
// ============================================================================
//
// = FILENAME
// Event_Con.h
//
// = AUTHOR
// originally
// David Levine (levine@cs.wustl.edu) and
// Tim Harrison (harrison@cs.wustl.edu)
// modified
// Michael Kircher (mk1@cs.wustl.edu)
//
// ============================================================================
#ifndef EVENT_CON_H
#define EVENT_CON_H
#include "ace/SString.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "orbsvcs/RtecEventChannelAdminC.h"
#include "orbsvcs/RtecEventCommS.h"
#include "orbsvcs/RtecSchedulerC.h"
class Demo_Consumer : public POA_RtecEventComm::PushConsumer
{
// = TITLE
// Demo Consumer
//
// = DESCRIPTION
// Simple example of a consumer that registers for supplier
// notifications.
public:
Demo_Consumer (void);
int open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec,
const char *my_name);
// Uses the name server to obtain a reference to the <supplier_name>
// and registers with channel to receive notifications from the
// supplier. Also registers to receive shutdown messages from the
// supplier. Stores <my_name> for printing out messages. Returns 0
// on success, -1 on failure.
virtual void disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException));
// The channel is disconnecting.
// = (not protected to allow short-circuiting) protected:
virtual void push (const RtecEventComm::EventSet &events
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException));
// If the <events>[0] is a notification, prints out the data from
// the supplier. If its a shutdown message, the consumer
// disconnects from the channel.
protected:
void shutdown (void);
// Disconnect from the Event Service.
// = Event channel adminstration references.
RtecEventChannelAdmin::EventChannel_var channel_admin_;
RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin_;
RtecEventChannelAdmin::ProxyPushSupplier_var suppliers_;
private:
RtecScheduler::handle_t rt_info_;
};
#endif /* EVENT_CON_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?