Project

General

Profile

ENX commands (ENX V2.6.02)

The main functions of the core is to command electronic hardware. For this purpose, we have the following set of functions:

  • MM, MMH, MMB: Modify an address.
  • MD, MDH, MDB: Display the value of an address.
  • DUMP: Dump a part of memory.
  • LOAD: Load a part of memory
  • SPECIAL: Use to call specific function
  • HELP

Memory modification functions

MM writes a 32 bits word, MMH writes a 16 bits word and MMB writes a 8 bits word.
Either ADDRESS or REGISTER must be used.

MM, MMH, MMB parameters are:
  • DEVICE
  • ADDRESS / REGISTER
  • VALUE
  • COUNT: (optional). Reiterate the same action on the COUNT following addresses.

XML request

A MM XML request with address looks like :

<command>
  <name>MM</name>
  <param name=”device”>DEVICE_NAME</param>
  <param name=”address”>ADDRESS</param>
  <param name=”value”>VALUE</param>
</command>

A MM XML request with named register looks like :

<command>
  <name>MM</name>
  <param name=”device”>DEVICE_NAME</param>
  <param name=”register”>REGISTER_NAME</param>
  <param name=”value”>VALUE</param>
</command>

ENX returns

When all is OK, you should have a return with the keyword VALUE. And the returns should looks like:

<result type="VALUE">
  <info status="OK"/>
</result>

For the moment the info status can only be OK.

If something is wrong you should have a message with the keyword error. To have more details about error, looks here.

Memory display functions

MD reads a 32 bits word, MDH reads a 16 bits word and MDB reads a 8 bits word.
Either ADDRESS or REGISTER must be used.

MD, MDH, MDB parameters are:
  • DEVICE
  • ADDRESS / REGISTER : (optional). Default is the last address.
  • COUNT: (optional). Read the COUNT following addresses.
  • SIGNED: (optionnal). Return a signed value.

Read the addr address and the count following. If no address, we take the last use address (default is 0x0). If no signed flag, the result is unsigned.
XML request

XML request

A MD XML request with address looks like:

<command>
  <name>MD</name>
  <param name=”device”>DEVICE_NAME</param>
  <param name=”address”>ADDRESS</param>
</command>

A MD XML request with named register looks like:

<command>
  <name>MD</name>
  <param name=”device”>DEVICE_NAME</param>
  <param name=”register”>REGISTER_NAME</param>
</command>

ENX returns

When all is OK, you should have a return with the keyword VALUE. And the returns should looks like:

<result type="VALUE">
  <val>
    <row>Row 1</row>
    <address>Address 1</address>
    <value>Value 1</value>
  </val>
  <val>
    <row>...</row>
    <address>...</address>
    <value>...</value>
  </val>
  <val>
    <row>Row N</row>
    <address>Address N</address>
    <value>Value N</value>
  </val>
</result>

If something is wrong you should have a message with the keyword error. To have more details about error, looks here.

Dump/Load function

Not yet implemented

Special function

This function is used to send non-standard function to an ENX device. The special function and all the parameter are written in a string.

This function has only two arguments:

  • DEVICE: Device name
  • COMMAND: This is a string with the name of the special function and his arguments.

XML request

A SPECIAL XML request look like:

<command>
  <name>SPECIAL</name>
  <param name=”device”>DEVICE_NAME</param>
  <param name=”command”>COMMAND_NAME [ARG1 [... [ARGN]]</param>
</command>

ENX returns

When all is OK, you should have a return with the keyword SPECIAL, and the returns should looks like:

<result type="SPECIAL">
  RETURNS_OF_THE_SPECIAL_FUNCTION
</result>

As a special function is a non standard one, we cannot guess the format of the return.
Each returns strongly depends of the driver code.

If something is wrong you should have a message with the keyword error. To have more details about error, looks here.

Help function

This function has only one optionnal argument:

  • ABOUT: Help about this function

XML request

A HELP XML request look like:

<command>
  <name>HELP</name>
  <param name=”about”>NAME</param>
</command>

The NAME can be one of the command, control or existing device.

ENX returns

When all is OK, you should have a return with the keyword HELP. And the returns should looks like:

<result type="HELP">
  TEXT_OF_THE_HELP
</result>

If something is wrong you should have a message with the keyword error. To have more details about error, looks here.