Example #1
0
 inline message_t ()
 {
     int rc = zmq_msg_init (&msg);
     if (rc != 0)
         throw error_t ();
 }
Example #2
0
 void start() const
 {
     int rc = zyre_start(m_self);
     if (rc == -1)
         throw error_t("Failed to start Zyre node");
 }
Example #3
0
 inline void bind (const char *addr_)
 {
     int rc = zmq_bind (ptr, addr_);
     if (rc != 0)
         throw error_t ();
 }
Example #4
0
 inline void connect (const char *addr_)
 {
     int rc = zmq_connect (ptr, addr_);
     if (rc != 0)
         throw error_t ();
 }
Example #5
0
 inline void MCDAQ_t::reset_trigger() {
     int ret;
     ret = mc_set_dio_bit(&dev, 3, 0);
     if(ret!=MC_SUCCESS)
         throw error_t(ret);       
 }
Example #6
0
 inline void copy (message_t *msg_)
 {
     int rc = zmq_msg_copy (&msg, &(msg_->msg));
     if (rc != 0)
         throw error_t ();
 }
Example #7
0
 inline void copy (message_t const *msg_)
 {
     int rc = zmq_msg_copy (&msg, const_cast<zmq_msg_t*>(&(msg_->msg)));
     if (rc != 0)
         throw error_t ();
 }
Example #8
0
 inline context_t (int io_threads_)
 {
     ptr = zmq_init (io_threads_);
     if (ptr == NULL)
         throw error_t ();
 }
Example #9
0
 inline void proxy_steerable (void *frontend, void *backend, void *capture, void *control)
 {
     int rc = zmq_proxy_steerable (frontend, backend, capture, control);
     if (rc != 0)
         throw error_t ();
 }
Example #10
0
 inline message_t (message_t &&rhs): msg (rhs.msg)
 {
     int rc = zmq_msg_init (&rhs.msg);
     if (rc != 0)
         throw error_t ();
 }
Example #11
0
 inline void proxy (void *frontend, void *backend, void *capture)
 {
     int rc = zmq_proxy (frontend, backend, capture);
     if (rc != 0)
         throw error_t ();
 }
Example #12
0
 inline context_t ()
 {
     ptr = zmq_ctx_new ();
     if (ptr == NULL)
         throw error_t ();
 }
Example #13
0
 inline ~message_t ()
 {
     int rc = zmq_msg_close (this);
     if (rc != 0)
         throw error_t ();
 }
Example #14
0
bool add_error(error_context_t& ctx, error_t::level_t lvl, T *node,
    const std::string& msg)
{
    ctx.add(error_t(lvl, xml_loc(node), msg));
    return false;
}
Example #15
0
 inline void device (int device_, void * insocket_, void* outsocket_)
 {
     int rc = zmq_device (device_, insocket_, outsocket_);
     if (rc != 0)
         throw error_t ();
 }
Example #16
0
 inline void copy (message_t *msg_)
 {
     int rc = zmq_msg_copy (this, (zmq_msg_t*) msg_);
     if (rc != 0)
         throw error_t ();
 }
Example #17
0
 inline message_t (size_t size_)
 {
     int rc = zmq_msg_init_size (&msg, size_);
     if (rc != 0)
         throw error_t ();
 }
Example #18
0
 inline socket_t (context_t &context_, int type_)
 {
     ptr = zmq_socket (context_.ptr, type_);
     if (ptr == NULL)
         throw error_t ();
 }
Example #19
0
 inline void MCDAQ_t::set_dio_out_dir() {
     int ret; 
     ret = mc_set_dio_out(&dev);
     if(ret!=MC_SUCCESS)
         throw error_t(ret);
 }