Edge Server Console

From RifidiWiki

Jump to: navigation, search

This page lists the various commands that you can use to control and configure the edge server from the OSGi console.

Use

Start up the edge server and wait for it to finish initializing. Once it is done, you will be able to type commands at the prompt. It is also possible to interact with the edge server remotely. To do this, see the information on the console configuration option

Commands

Listing Current State

readertypes
List the types of readers adapters that are supported through installed reader plugins
commandtypes
List the types of commands that are supported through installed command plugins
readers
List the available reader configurations
commands
List the available command configurations

Reader Configurations

createreader <readertype> [<prop> <val>]*
Create a reader configuration. You must supply a readertype (from the output of the readertypes command). If called with no other arguments, a reader configuration with default properties will be created. You may change default properties, by supplying prop val pairs. The output of this command will give you the ID of the reader configuration, which you will need to control the reader later. A few examples:
createreader Alien - Create an Alien9800 reader configuration with default properties.
createreader Alien IpAddress 192.168.1.115 Port 23 - Create an Alien reader configuration with the supplied IP and Port properties.
deletereader <readerID>
Delete a reader configuration. You must supply the ID of the reader configuration to delete (The ID was the output of the createreader command).

Command Configuration

createcommand <commandtype> [<prop> <val>]*

Create a command configuration. You must supply a commandtype (from the output of the commandtypes command). If called with no other arguments, a command configuration with default properties will be created. You may change default properties, by supplying prop val pairs. The output of this command will give you the ID of the command configuration, which you will need to control the command later. A few examples:
createcommand Alien9800-GetTagList - Create an Alien9800 command configuration that gets tags with default properties.
createcommand Alien9800-GetTagList tagtype 1 - Create an Alien9800 command configuration that gets only Gen2 tags.

deletecommand <commandID>
Delete a command configuration. You must supply the ID of the command configuration to delete (The ID was the output of the createcommand command).

Properties

getproperties <id>
List the properties of the configuration. The ID can either be a reader configuration ID or a command configuration ID.
setproperties <id> [<prop> <val>]*
Set the properties on a configuration. You must supply either a reader configuration ID or a command configuration ID. Then you can list prop val pairs.
setproperties Alien9800_1 RFAttenuation 100 - Set the RFAttenuation to 100 on Alien9800_1 reader configuration.
applypropertychanges <readerID>
Some properties of readers (e.g. RFAttenuation) need to be sent across the wire and set on the device itself. This command collects the properties that have changed since the last time it was called and sends all those property changes at once to the reader.

Sessions

createsession <readerID>
Creates a session to communicate with the reader device. You must supply the ID of the reader configuration to use. This command
deletesession <readerID> <sessionID>
Delete the session. You must supply the ID of the reader configuration and the ID of the session to delete.

prints out the ID of the session that was created.

startsession <readerID> <sessionID>
Causes the session to establish a physical connection with the device (such as a TCP/IP connection). Once the session has been started, commands can be sent to the reader device.
stopsession <readerID> <sessionID>
Causes the session to disconnect from the reader device. You must supply the ID of the reader configuration and the ID of the session to stop
executecommand <readerID> <sessionID> <commandID> <interval>
Starts the execution of commands on a reader device. You must supply the ID of the reader configuraiton, the ID of the session in the reader configuration, the ID of the command configuration that should be executed on the session, and an interval in milliseconds that is how often the command should be excuted. If the command should only be executed once, iterval should be 0. If the command is scheduled for repeated execution, the session will assign the command a job ID that can be used to stop its execution with the killcommand command.
executecommand Alien9800_1 1 Alien9800_GetTagList_1 1000 - Execute the GetTagList command on AlienReader_1 session 1 once every second.
executecommand LLRP_1 1 LLRPROSpecCommand 0 - Execute the LLRPROSpec command on LLRP_1 session 1 only once.
killcommand <readerID> <sessionID> <jobID>
Causes a scheduled command to stop being executed. You must give the ID of the reader configuration and the ID of the session where the command is being executed as well as the job ID.

General

save
Persists the configuration of the edge server (reader configurations and command configurations to a file)
setloglevel <logger> <level>
Sets the level of log output. You must supply a logger name, which can be a class name or a package name as well as a log level. Log levels can be (in order)[FATAL|ERROR|WARN|INFO|DEBUG]. More specific loggers take precedent over less specific ones. For example, if I set the logger level of org.rifidi.edge to INFO (so that I will see info level log statements and above in any class in the org.rifidi.edge package), and I set org.rifidi.edge.core to DEBUG, I will see debug level and above from anything in and under org.rifidi.edge.core, because it is more specific than org.rifidi.edge
Personal tools