agent_class :'aag_3::smpp_smsc::a_channel_t' do |c|

  c.super_class :'so_sysconf_2::agent_with_fatal_state_t'

  c.msg_slot :msg_start, sobjectizer_start_message

  c.msg_slot :msg_client_connected,
      of_type( :'so_4::rt::comm::msg_client_connected' )
  c.msg_slot :msg_client_disconnected,
      of_type( :'so_4::rt::comm::msg_client_disconnected' )
  c.msg_slot :msg_connect_fail,
      of_type( :'so_4::rt::comm::msg_fail' )
  c.msg_slot :msg_raw_package,
      of_type( :'so_4::rt::comm::msg_raw_package' )

  c.msg_slot :msg_bind_resp_timeout, own_message( :checker => true )

  c.msg_slot :msg_check_channel_activity, own_message
  c.msg_slot :msg_shutdown, own_message

  c.msg_slot :msg_unbind_resp_timeout, own_message( :checker => true )

  c.msg_slot :msg_reconnect, own_message

  c.msg_slot :msg_tell_state, own_message

  c.msg_slot :msg_operation_timer, own_message

  c.msg_slot :msg_imit_deliver,
      own_message( :checker => true,
          :fields => fields(
              :m_count => UINT,
              :m_sequence_number => UINT,
              :m_source_addr => STRING,
              :m_dest_addr => STRING,
              :m_data => STRING,
              :m_dcs => UCHAR,
              :m_esm_class => UCHAR,
              :m_protocol_id => UCHAR ) )
  c.msg_slot :msg_imit_delivery_receipt,
      own_message( :checker => true,
          :fields => fields(
              :m_short_message => STRING,
              :m_message_id => STRING,
              :m_message_state => UCHAR,
              :m_network_error_code => STRING ) )

  c.msg_slot :msg_imitation_mode,
      own_message( :checker => true,
          :fields => fields(
              :m_submit_sm_resp_command_status => UINT,
              :m_message_id => STRING ) )

  c.msg_slot :msg_query_state, own_mbapi_message
  c.msg_slot :msg_send, own_mbapi_message

  c.msg_slot :msg_update_gemont_data, own_message

  c.initial_state :st_closed

  c.state :st_closed do |st|
    st.on :msg_start                  => :evt_start
    st.on :msg_client_connected       => :evt_client_connected
    st.on :msg_client_disconnected    => UNEXPECTED
    st.on :msg_connect_fail           => :evt_connect_fail
    st.on :msg_raw_package            => UNEXPECTED
    st.on :msg_bind_resp_timeout      => IGNORE
    st.on :msg_check_channel_activity => IGNORE
    st.on :msg_shutdown               => :evt_shutdown_when_unbound
    st.on :msg_unbind_resp_timeout    => IGNORE
    st.on :msg_reconnect              => IGNORE
    st.on :msg_tell_state             => :evt_tell_state_when_unbound
    st.on :msg_operation_timer        => IGNORE
    st.on :msg_imit_deliver           => :evt_imit_deliver
    st.on :msg_imit_delivery_receipt  => :evt_imit_delivery_receipt
    st.on :msg_imitation_mode         => :evt_imitation_mode_when_closed
    st.on :msg_query_state            => :evt_query_state_when_unbound
    st.on :msg_send                   => :evt_send_when_unbound
    st.on :msg_update_gemont_data     => :evt_update_gemont_data

    st.on_enter :on_enter_st_closed
  end

  c.state st_open do |st|
    st.on :msg_start                  => UNEXPECTED
    st.on :msg_client_connected       => UNEXPECTED
    st.on :msg_client_disconnected    => :evt_client_disconnected
    st.on :msg_connect_fail           => UNEXPECTED
    st.on :msg_raw_package            => :evt_raw_package
    st.on :msg_bind_resp_timeout      => :evt_bind_resp_timeout
    st.on :msg_check_channel_activity => :evt_check_channel_activity
    st.on :msg_shutdown               => :evt_shutdown_when_unbound
    st.on :msg_unbind_resp_timeout    => IGNORE
    st.on :msg_reconnect              => IGNORE
    st.on :msg_tell_state             => :evt_tell_state_when_unbound
    st.on :msg_operation_timer        => IGNORE
    st.on :msg_imit_deliver           => :evt_imit_deliver
    st.on :msg_imit_delivery_receipt  => :evt_imit_delivery_receipt
    st.on :msg_imitation_mode         => IGNORE
    st.on :msg_query_state            => :evt_query_state_when_unbound
    st.on :msg_send                   => :evt_send_when_unbound
    st.on :msg_update_gemont_data     => :evt_update_gemont_data

    st.on_enter :on_enter_st_open
  end

  c.state :st_bound_tx do |st|
    st.on :msg_start                  => UNEXPECTED
    st.on :msg_client_connected       => UNEXPECTED
    st.on :msg_client_disconnected    => :evt_client_disconnected
    st.on :msg_connect_fail           => UNEXPECTED
    st.on :msg_raw_package            => :evt_raw_package
    st.on :msg_bind_resp_timeout      => IGNORE
    st.on :msg_check_channel_activity => :evt_check_channel_activity
    st.on :msg_shutdown               => :evt_shutdown_when_bound
    st.on :msg_unbind_resp_timeout    => IGNORE
    st.on :msg_reconnect              => :evt_reconnect
    st.on :msg_tell_state             => :evt_tell_state_when_bound
    st.on :msg_operation_timer        => :evt_operation_timer
    st.on :msg_imit_deliver           => :evt_imit_deliver
    st.on :msg_imit_delivery_receipt  => :evt_imit_delivery_receipt
    st.on :msg_imitation_mode         => :evt_imitation_mode_when_bound
    st.on :msg_query_state            => :evt_query_state_when_bound
    st.on :msg_send                   => :evt_send
    st.on :msg_update_gemont_data     => :evt_update_gemont_data

    st.on_enter :on_enter_st_bound_tx
  end

  c.state :st_bound_rx do |st|
    st.on :msg_start                  => UNEXPECTED
    st.on :msg_client_connected       => UNEXPECTED
    st.on :msg_client_disconnected    => :evt_client_disconnected
    st.on :msg_connect_fail           => UNEXPECTED
    st.on :msg_raw_package            => :evt_raw_package
    st.on :msg_bind_resp_timeout      => IGNORE
    st.on :msg_check_channel_activity => :evt_check_channel_activity
    st.on :msg_shutdown               => :evt_shutdown_when_bound
    st.on :msg_unbind_resp_timeout    => IGNORE
    st.on :msg_reconnect              => :evt_reconnect
    st.on :msg_tell_state             => :evt_tell_state_when_bound
    st.on :msg_operation_timer        => :evt_operation_timer
    st.on :msg_imit_deliver           => :evt_imit_deliver
    st.on :msg_imit_delivery_receipt  => :evt_imit_delivery_receipt
    st.on :msg_imitation_mode         => :evt_imitation_mode_when_bound
    st.on :msg_query_state            => :evt_query_state_when_bound
    st.on :msg_send                   => IGNORE
    st.on :msg_update_gemont_data     => :evt_update_gemont_data

    st.on_enter :on_enter_st_bound_rx
  end

  c.state :st_bound_trx do |st|
    st.on :msg_start                  => UNEXPECTED
    st.on :msg_client_connected       => UNEXPECTED
    st.on :msg_client_disconnected    => :evt_client_disconnected
    st.on :msg_connect_fail           => UNEXPECTED
    st.on :msg_raw_package            => :evt_raw_package
    st.on :msg_bind_resp_timeout      => IGNORE
    st.on :msg_check_channel_activity => :evt_check_channel_activity
    st.on :msg_shutdown               => :evt_shutdown_when_bound
    st.on :msg_unbind_resp_timeout    => IGNORE
    st.on :msg_reconnect              => :evt_reconnect
    st.on :msg_tell_state             => :evt_tell_state_when_bound
    st.on :msg_operation_timer        => :evt_operation_timer
    st.on :msg_imit_deliver           => :evt_imit_deliver
    st.on :msg_imit_delivery_receipt  => :evt_imit_delivery_receipt
    st.on :msg_imitation_mode         => :evt_imitation_mode_when_bound
    st.on :msg_query_state            => :evt_query_state_when_bound
    st.on :msg_send                   => :evt_send
    st.on :msg_update_gemont_data     => :evt_update_gemont_data

    st.on_enter :on_enter_st_bound_trx
  end

  c.start :st_wait_unbind_resp do |st|
    st.on :msg_start                  => UNEXPECTED
    st.on :msg_client_connected       => UNEXPECTED
    st.on :msg_client_disconnected    => :evt_disconnection_when_wait_unbind
    st.on :msg_connect_fail           => UNEXPECTED
    st.on :msg_raw_package            => :evt_raw_package
    st.on :msg_bind_resp_timeout      => :evt_unbind_resp_timeout
    st.on :msg_check_channel_activity => IGNORE
    st.on :msg_shutdown               => IGNORE
    st.on :msg_unbind_resp_timeout    => IGNORE
    st.on :msg_reconnect              => IGNORE
    st.on :msg_tell_state             => :evt_tell_state_when_unbound
    st.on :msg_operation_timer        => IGNORE
    st.on :msg_imit_deliver           => IGNORE
    st.on :msg_imit_delivery_receipt  => IGNORE
    st.on :msg_imitation_mode         => IGNORE
    st.on :msg_query_state            => :evt_query_state_when_unbound
    st.on :msg_send                   => :evt_send_when_unbound
    st.on :msg_update_gemont_data     => :evt_update_gemont_data

    st.on_enter :on_enter_st_wait_unbind_resp
  end

  c.start :st_imitation_mode do |st|
    st.on :msg_start                  => UNEXPECTED
    st.on :msg_client_connected       => UNEXPECTED
    st.on :msg_client_disconnected    => UNEXPECTED
    st.on :msg_connect_fail           => UNEXPECTED
    st.on :msg_raw_package            => UNEXPECTED
    st.on :msg_bind_resp_timeout      => IGNORE
    st.on :msg_check_channel_activity => IGNORE
    st.on :msg_shutdown               => :evt_shutdown_when_unbound
    st.on :msg_unbind_resp_timeout    => IGNORE
    st.on :msg_reconnect              => IGNORE
    st.on :msg_tell_state             => IGNORE
    st.on :msg_operation_timer        => IGNORE
    st.on :msg_imit_deliver           => :evt_imit_deliver
    st.on :msg_imit_delivery_receipt  => :evt_imit_delivery_receipt
    st.on :msg_imitation_mode         => :evt_imitation_mode_when_closed
    st.on :msg_query_state            => IGNORE
    st.on :msg_send                   => :evt_send_when_imitation_mode
    st.on :msg_update_gemont_data     => :evt_update_gemont_data
  end

  c.state :st_shutdown do |st|
    st.on :msg_start                  => UNEXPECTED
    st.on :msg_client_connected       => IGNORE
    st.on :msg_client_disconnected    => IGNORE
    st.on :msg_connect_fail           => IGNORE
    st.on :msg_raw_package            => IGNORE
    st.on :msg_bind_resp_timeout      => IGNORE
    st.on :msg_check_channel_activity => IGNORE
    st.on :msg_shutdown               => IGNORE
    st.on :msg_unbind_resp_timeout    => IGNORE
    st.on :msg_reconnect              => IGNORE
    st.on :msg_tell_state             => IGNORE
    st.on :msg_operation_timer        => IGNORE
    st.on :msg_imit_deliver           => IGNORE
    st.on :msg_imit_delivery_receipt  => IGNORE
    st.on :msg_imitation_mode         => IGNORE
    st.on :msg_query_state            => IGNORE
    st.on :msg_send                   => IGNORE
    st.on :msg_update_gemont_data     => IGNORE
    
    st.on_enter :on_enter_st_shutdown 
  end

end

# vim:ts=2:sts=2:sw=2:expandtab

Hosted by uCoz