M1M3 Support System
|
Abstract class. More...
#include <BusList.h>
Public Member Functions | |
BusList (ILCSubnetData *subnetData, ILCMessageFactory *ilcMessageFactory) | |
virtual void | buildBuffer () |
(Re)-build message send to FPGA. | |
int32_t | getLength () |
uint16_t * | getBuffer () |
int32_t * | getExpectedHPResponses () |
int32_t * | getExpectedFAResponses () |
int32_t * | getExpectedHMResponses () |
virtual void | update () |
Called when update to buffer is required. | |
Protected Member Functions | |
void | startSubnet (uint8_t subnet) |
Writes command to start a subnet message on the bus. | |
void | endSubnet () |
Ends subnet. | |
Protected Attributes | |
ILCSubnetData * | subnetData |
Status of messages on a subnet. | |
ILCMessageFactory * | ilcMessageFactory |
ModbusBuffer | buffer |
Buffer holding data send to FPGA Command FIFO. | |
int32_t | expectedHPResponses [HP_COUNT] |
int32_t | expectedFAResponses [FA_COUNT] |
int32_t | expectedHMResponses [HP_COUNT] |
int32_t | subnetStartIndex |
Abstract class.
Holds list of ILCs on the bus. Allows CSC to query ILCs of their status, command what is needed etc. This is achieved by storing (caching) ModbusBuffer with required bytes, which is updated in update call with new force demands etc.
Buses 1-4 holds only Force Actuator (FA) ILCs. Bus 5 is reserved for Hardpoint Actuator (HP).
The major challenge in commanding ILCs on the buses is to keep messages short and this system as fast as possible. Not all ILCs can be queried in a single loop for all data.
To speed up query build-up, FPGA transmitt buffer is prepared in buildBuffer methed. It is then updated at specified parts in update method.
Only required data are quieried in every loop. Other queries (e.g. ServerState,..) are distributed, and only ILC subset is updated on every loop. The subset moves in round-robin fashion.
|
virtual |
(Re)-build message send to FPGA.
Should be called when external conditions changes - e.g. when an ILC is disabled.
Reimplemented in LSST::M1M3::SS::ActiveBusList, LSST::M1M3::SS::ChangeILCModeBusList, LSST::M1M3::SS::FreezeSensorBusList, LSST::M1M3::SS::RaisedBusList, LSST::M1M3::SS::ReadBoostValveDCAGainBusList, LSST::M1M3::SS::ReadCalibrationBusList, LSST::M1M3::SS::ReportADCScanRateBusList, LSST::M1M3::SS::ReportDCAIDBusList, LSST::M1M3::SS::ReportDCAStatusBusList, LSST::M1M3::SS::ReportServerIDBusList, LSST::M1M3::SS::ReportServerStatusBusList, LSST::M1M3::SS::ResetBustList, LSST::M1M3::SS::SetADCChanneOffsetAndSensitivityBusList, LSST::M1M3::SS::SetADCScanRateBusList, and LSST::M1M3::SS::SetBoostValveDCAGainBusList.
|
protected |
Ends subnet.
Writes IRQ trigger and sets buffer length.
|
protected |
Writes command to start a subnet message on the bus.
Length is filled in endSubnet() method.
|
inlinevirtual |
Called when update to buffer is required.
Shall write new values to ILC commands etc.
Reimplemented in LSST::M1M3::SS::ActiveBusList, LSST::M1M3::SS::FreezeSensorBusList, and LSST::M1M3::SS::RaisedBusList.