← 输入框|github.com|刷新
Skip to content

Latest commit

 

History

History

SensorManager

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Sensor Manager

alt text Distributed system for remote control of sensors based on JMS and the Publish / Subscribe paradigm. The system consists of:

  • Control Station (publisher): The ControlStation publishes N JMS messages: each message is received by all Sensors subscribed to the ControlStation. A message contains 1 command that will be executed by the receiving sensor. The possible commands are: startSensor, stopSensor, read. The ControlStation publishes 1 message per second (the command to insert in the JMS message is chosen randomly).
  • Sensor (subscriber): Implement asynchronous receive. For each message received, Sensor creates a new thread, TManager, responsible for inserting the command received in a circular queue of size D. A dedicated Sensor thread, called TExecutor, empties the queue at regular intervals of 10 seconds; the commands taken from the queue are saved in the CmdLog.txt file. Access to the queue respects the constraints of the producer / consumer problem.