Measurement Server v0.01
For download, click here
Measurement Server v0.01
For download, click here
Tested with Java 17. Java .1.8 and Windows under test.
To see the options:
java -jar mserver.jar
Measurement Server v0.01
Parameters:
-listports | -lp Show all connected serial devices
-port | -p Port name with the connected device
-eval | -e Analysis technique: bootstrap | batch_means | sample_means | block_gumbel | block_gev | test
-size | -s Sample size
-error| -err Relative error for the parametric method. Values from 0 to 1
-alpha | -a Significance level
-b Batch or bootstrap sample size
-device arduinoDC | minipa | arduino | fake: minipa is the default option
-sport Port for the measurement server. Default 12345
-verbose | -v Print all collected data from a device
-prob Probability for extreme values
-help | -h Help
Supported Devices (option -device)
minipa : Minipa ET-4091 (We guess this is the brazilian version of BM157 Brymen)
arduino: power meter developed by our group for AC power.
arduinoDC: power meter developed by our group for DC power.
fake: generates random power values (2 Hz). It is useful for tesing client scripts.
Evaluation Techniques (option -eval | -e)
For all techniques (except batch_means), the stop criteria is the sample (-size | -s) or block (-b ) sizes
bootstrap: bootstrap technique.
batch_means: batch means method. The stop criteria is the relative error
sample_means: sssumes the student distribution for the sampling distribution of sample means (i.e., Central Limit Theorem)
block_gumbel: nlock maxima technique using Gumbel Distribuiton for extreme values. You may use -prob to obtain an estimate of the extreme value
block_gev: nlock maxima technique using Generalized Extreme Value Distribution for extreme values. You may use -prob to obtain an estimate of the extreme value
test: shows the collected data from a device
Linux Users
As we adopt jSeriaComm ,you need to perform the following commands, Replace username by your actual user name. Do not worry if some commands fail. After executing such commands, log out before running the server. Be aware that these commands only need to be performed once for each user.
sudo usermod -a -G uucp username
sudo usermod -a -G dialout username
sudo usermod -a -G lock username
sudo usermod -a -G tty username
Windows Users
Disable antivirus before using the software. For instance, we had problems running with AVG Antivirus.
Tips
If you want to test the server or client without a power meter (e.g., arduino), you may adopt fake as the device.
ex: java -jar mserver.jar -eval bootstrap -device fake
Note: For all situations (excluding -eval test), you need a client to connect with the server to indicate the start and end of each sample
If you just want to test if the communication with the device is working, you can utilize -eval test
ex: java -jar mserver.jar -eval test -device arduino
For saving the results in a file, use > filename after the command line.
ex: java -jar mserver.jar -eval test -device fake > output
For keeping track of the server messages during execution, you can adopt the following commands in a new terminal:
UNIX-based operating systems. (e.g., Linux): tail -f output
Windows: Open a PowerShell terminal and, then, Get-Content output -Wait -Tail 30
For testing a client, you may utilize python scripts (see download link) or a java client
ex: java -cp mserver.jar modcs.ClientTest
The server tries to automatically detect the device using the port description provided by the operating system (SO). However, the OS may not provide the expected description and an error will occur (i.e., device not detected). Besides, in some situations, you may have several devices connected to the computer (e.g., 2 arduinos). Thus, see the attached devices using the following comamnd:
java -jar mserver.jar -lp
Next, inform the port (-port) during evaluation
ex: java -jar mserver.jar -eval parametric_wb -device arduino -port COM9
The server adopts 12345 as the default port. If it conflicts with another servier, you may change the port using -sport
ex: java -jar mserver.jar -eval parametric -device minipa -sport 6677