Skip to content

TCPIP meter

Annaliese McDermond edited this page Feb 25, 2022 · 3 revisions

Externally Defined Meters

Meter Create

Creates a meter within the radio that will accept values through the VITA49 port 4991 through UDP. All fields in the command are required.

 C[D]<seq_number>|meter create name=<name> type=<meter_type> min=<float_value> max=<float_value> units=<unit>

<name> = Name for the meter (must be 20 characters or less)
<meter_type> = the type of client that is requesting the meter (see table)
<min> = Minimum value for meter (floating point)
<max> = Max value for meter (floating point)
<unit> = This determines the scaling that the radio will use. DB|DBM|DBFS|VOLTS|AMPS|TEMPF|TEMPC|RPM|SWR

Example:

 C43|meter create name=MyAMP type=AMP min=0.0 max=1500.0 units=WATTS

The table below shows the currently supported <meter_type> parameters to the create command:

Parameter Value
AMP External power amplifier
WAVEFORM Waveform using the Waveform API

See Response Format for details on the format of the response messages from the radio

Hex Response Message Debug Output / Meaning
00000000 <meter_number>, <stream_id> OK, <meter_number> is the id to use in future communications (decimal), <stream_id> is the stream id that must be placed in the UDP VITA49 packet when sending meter values (hexadecimal)
50000016   Malformed Command
5000002C   Incorrect number of parameters
500000A5   Invalid meter type
500000A6   Invalid Units

Responses

Response Example:

R43|27,0x88000000

Sending Meter Data

Once a meter has been created the radio will accept meter packets on the standard VITA49 Port 4991.

Using the Metering protocol#Meter_Extension_Packet format you can create UDP VITA49 packets to provide streaming meter values for the meters you have created.

Several things must be set properly in the packet:

  • The Stream Identifier field must be the <stream_id> given in the response to the "meter create" command.
  • The Meter Identifier field must be the <meter_number> give in the response to the "meter create" command.

If you have created multiple meters you can bundle all the values in a singe VITA49 packet.

Data Scaling

Since the VITA49 Meter packet only allows int16 scaling is done on certain units to get the reported value.

Unit Scaling
DB,DBM,DBFS Converted to VitaDB value ( converted_value = ((int32)(MeterValue * 128) & 0xFFFF) )
VOLTS,AMPS Converted to floating point value ( converted_value = (float) ( MeterValue * 256.0)
TEMPC,TEMPF Converted to floating point value ( converted_value = (float) ( MeterValue * 64.0) )
All Others Value used directly without conversion