EMServer::EMServer() : AbstractServer(), port(EM::Default::PORT), fifo_size(EM::Default::FIFO_SIZE), fifo_low_watermark(EM::Default::FIFO_LOW_WATERMARK), fifo_high_watermark(EM::Default::FIFO_HIGH_WATERMARK), buffer_length(EM::Default::BUFFER_LENGTH), tx_interval(EM::Default::TX_INTERVAL), io_service(), udp_socket(io_service, boost::asio::ip::udp::endpoint(boost::asio::ip::udp::v4(), port)), current_nr(0), mixer_timer(io_service) { ClientObject *dummy = new ClientObject(0, get_fifo_size(), get_fifo_low_watermark(), get_fifo_high_watermark()); clients[0] = dummy; }
void EMServer::add_client(uint cid) { clients[cid] = new ClientObject(cid, get_fifo_size(), get_fifo_low_watermark(), get_fifo_high_watermark()); }
void sang_reset(void) /* Reset the root transputer. */ { register int i; outp (link_analyse, FALSE); /* deassert analyse */ outp (link_reset, FALSE); /* deassert reset */ for (i=0; i < RESET_COUNT; i++) /* wait awhile */ ; outp (link_reset, TRUE); /* assert reset */ for (i=0; i < RESET_COUNT; i++) /* wait awhile */ ; outp (link_reset, FALSE); /* deassert reset */ for (i=0; i < RESET_COUNT; i++) /* wait awhile */ ; get_fifo_size(); outp (link_reset, TRUE); /* assert reset */ for (i=0; i < RESET_COUNT; i++) /* wait awhile */ ; outp (link_reset, FALSE); /* deassert reset */ for (i=0; i < RESET_COUNT; i++) /* wait awhile */ ; initC012(); }