sample/filter/c2i.cpp
#include "c2i.hpp"
#include <oess_1/io/custom/ace/h/Date_Time.h>
#include <so_4/rt/h/rt.hpp>
#include <so_4/rt/h/sol_msg_field_oess_io_custom.hpp>
oess_1::io::istream_t &
operator>>( oess_1::io::istream_t & s, server_act_t & o )
{
return ( s >> o.m_client_timestamp >> o.m_server_timestamp );
}
oess_1::io::ostream_t &
operator<<( oess_1::io::ostream_t & s, const server_act_t & o )
{
return ( s << o.m_client_timestamp << o.m_server_timestamp );
}
c2i_t::msg_request::msg_request()
{}
c2i_t::msg_request::msg_request(
const server_act_t & act )
: m_act( act )
{}
c2i_t::msg_reply::msg_reply()
{}
c2i_t::msg_reply::msg_reply(
const server_act_t & act,
const ACE_Date_Time & client_reply_time )
: m_act( act )
, m_client_reply_time( client_reply_time )
{}
SOL4_CLASS_START( c2i_t )
SOL4_MSG_START( msg_request, c2i_t::msg_request )
SOL4_MSG_FIELD_OESS_IO_CUSTOM( m_act )
SOL4_MSG_FINISH()
SOL4_MSG_START( msg_reply, c2i_t::msg_reply )
SOL4_MSG_FIELD_OESS_IO_CUSTOM( m_act )
SOL4_MSG_FIELD_OESS_IO_CUSTOM( m_client_reply_time )
SOL4_MSG_FINISH()
SOL4_CLASS_FINISH()
c2i_t::c2i_t()
:
base_type_t( agent_name() )
{
}
c2i_t::~c2i_t()
{
}
const std::string &
c2i_t::agent_name()
{
static std::string name( "a_c2i" );
return name;
}
const std::string &
c2i_t::agent_type()
{
static std::string type_name( "c2i_t" );
return type_name;
}