package art.servers.etdserver.protocols.skp3;
|
|
|
public class SKP3_TrafficData
|
{
|
public int identifier = 0;
|
public int cfg = 0;
|
public int value = 0;
|
|
|
public float getValue()
|
{
|
try
|
{
|
if (cfg == SKP3_ProtocolWriter.CFG_MULTIPLIER_1)
|
return(value);
|
if (cfg == SKP3_ProtocolWriter.CFG_MULTIPLIER_10)
|
return((float)((float)value/10f));
|
if (cfg == SKP3_ProtocolWriter.CFG_MULTIPLIER_100)
|
return((float)((float)value/100f));
|
if (cfg == SKP3_ProtocolWriter.CFG_MULTIPLIER_1000)
|
return((float)((float)value/1000f));
|
}
|
catch (Exception e)
|
{
|
|
}
|
|
return(value);
|
}
|
|
|
public String toString()
|
{
|
try
|
{
|
String message = "--------------------------\r\n";
|
message += "TrafficData Id : " + identifier + "\r\n";
|
message += "TrafficData Cfg : " + cfg + "\r\n";
|
message += "TrafficData Value: " + value + "\r\n";
|
return(message);
|
}
|
catch (Exception e)
|
{
|
|
}
|
|
return(super.toString());
|
}
|
|
}
|