bck
Alejandro Acuña
2024-11-11 f1cb4443aede6d4657bdc3396c8914d3a9f4fa93
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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());
    }
 
}