def switch(network_id, channel_id, state)
      request = ScheduleRequest.new(:network_id => network_id, :channel_id => channel_id)
      if state
        request.always_on!
        @logger.info("Turning on channel #{channel_id} on network 0x#{network_id.to_s(16)}")
      else
        request.always_off!
        @logger.info("Turning off channel #{channel_id} on network 0x#{network_id.to_s(16)}")
      end
      @serial.transmit(request)
      ScheduleResponse.read(@serial.receive(6))
    end
def switch(network_id, channel_id, state)
      request = ScheduleRequest.new(:network_id => network_id, :channel_id => channel_id)
      if state
        request.always_on!
        @logger.info("Turning on channel #{channel_id} on network 0x#{network_id.to_s(16)}")
      else
        request.always_off!
        @logger.info("Turning off channel #{channel_id} on network 0x#{network_id.to_s(16)}")
      end
      @serial.transmit(request)
      ScheduleResponse.read(@serial.receive(6))
    end
Public: Used to controls whether a socket is on or off.

 network_id - 2 byte identified for the network.
 channel_id - 1 byte identified for the channel.
 enabled    - true enables the socket and false disables it.

 Returns the SwitchResponse.