Ejemplo n.º 1
0
def send_get_version_timeout_command():
    delay = 2
    command_line = helper.build_input_packet('gV')
    result = yield MESSAGE_CENTER.build(
        command=test_helper.wrap_delay_response_command(command_line, delay),
        timeout=1)
    return result
def send_get_parameter_command():
    # get packet type
    command_line = helper.build_input_packet('gP',
                                             properties=PROPERTIES,
                                             param=3)
    result = yield MESSAGE_CENTER.build(command=command_line)
    return result
def send_get_version_command():
    delay = 2
    command_line = helper.build_input_packet('gV')
    result = yield MESSAGE_CENTER.build(command=command_line)
    return result
def send_get_all_parameters_command():
    command_line = helper.build_input_packet('gA')
    result = yield MESSAGE_CENTER.build(command=command_line)
    return result
def send_ping_command():
    command_line = helper.build_input_packet('pG')
    result = yield MESSAGE_CENTER.build(command=command_line)
    return result
def send_invalid_response_message():
    command_line = helper.build_input_packet('NA')
    result = yield MESSAGE_CENTER.build(command=command_line)
    return result
Ejemplo n.º 7
0
def send_mag_status_command():
    command_line = helper.build_input_packet('ma', PROERTIES, 'status')  # 0
    result = yield MESSAGE_CENTER.build(command=command_line)
    print('ma status result: {0} \n'.format(result['data']))
    return result
Ejemplo n.º 8
0
def send_get_all_parameters_command():
    command_line = helper.build_input_packet('gA')
    result = yield MESSAGE_CENTER.build(command=command_line)
    print('gA result: {0} \n'.format(result['data']))
    return result
Ejemplo n.º 9
0
def send_ping_command():
    command_line = helper.build_input_packet('pG')
    result = yield MESSAGE_CENTER.build(command=command_line, timeout=3)
    print('pG result: {0}\n'.format(result['data']))
    return result
Ejemplo n.º 10
0
def send_mag_request_values_command():
    command_line = helper.build_input_packet('ma', PROERTIES, 'stored')  # 7
    result = yield MESSAGE_CENTER.build(command=command_line)
    print('ma request values result: {0} \n'.format(result['data']))
    return result