FREEDM DGI
|
Classes | |
class | CAdapterFactory |
Handles the creation of adapters and their associated devices. More... | |
class | CDevice |
Defines the interface used to access physical hardware. More... | |
class | CDeviceBuilder |
Handles construction of all device objects used by the DGI. More... | |
class | CDeviceManager |
The interface between broker modules and the device architecture. More... | |
class | CFakeAdapter |
Physical adapter device interface that stores settings in itself. More... | |
class | CPnpAdapter |
PNP adapter that maintains a TCP server for a set of plug-and-play devices. More... | |
class | CRtdsAdapter |
Provides an interface for communicating with a RTDS simulation model. More... | |
class | CTcpServer |
TCP server that handles a single client connection. More... | |
struct | DeviceInfo |
Stores the internal structure of a device object. More... | |
struct | EBadRequest |
Used when a device controller sends a bad packet. More... | |
struct | EDgiConfigError |
Used when the DGI has been misconfigured. More... | |
struct | EDuplicateSession |
Used when the adapter factory already has an open session for a controller. More... | |
class | IAdapter |
Physical adapter device interface. More... | |
class | IBufferAdapter |
Buffer adapter device interface. More... | |
Typedefs | |
typedef std::pair< const std::string, const std::string > | DeviceSignal |
Type of the unique identifier for device values. More... | |
typedef boost::optional < boost::system::error_code > | OptionalError |
Convenience typedef for the SetResult function. More... | |
typedef float | SignalValue |
Type of the value for device signals. More... | |
Functions | |
BOOST_STATIC_ASSERT (sizeof(SignalValue)==4) | |
std::ostream & | operator<< (std::ostream &os, const DeviceInfo &info) |
Outputs the device information to the passed output stream. More... | |
void | SetResult (boost::shared_ptr< OptionalError > status, const boost::system::error_code &error) |
Callback function for the timed synchronous operations. More... | |
template<typename ReadStream , typename BufferSequence > | |
void | TimedRead (ReadStream &stream, const BufferSequence &buffer, unsigned int duration) |
template<typename ReadStream , typename Allocator > | |
void | TimedReadUntil (ReadStream &stream, boost::asio::basic_streambuf< Allocator > &buffer, const std::string &delim, unsigned int duration) |
template<typename WriteStream , typename BufferSequence > | |
void | TimedWrite (WriteStream &stream, const BufferSequence &buffer, unsigned int duration) |
template<typename WriteStream , typename Allocator > | |
void | TimedWrite (WriteStream &stream, boost::asio::basic_streambuf< Allocator > &buffer, unsigned int duration) |
Variables | |
const SignalValue | NULL_COMMAND = std::pow(10, 8) |
Sent by the DGI to indicate it knows nothing about the state of a device. More... | |
typedef std::pair<const std::string, const std::string> freedm::broker::device::DeviceSignal |
typedef boost::optional<boost::system::error_code> freedm::broker::device::OptionalError |
typedef float freedm::broker::device::SignalValue |
freedm::broker::device::BOOST_STATIC_ASSERT | ( | sizeof(SignalValue) | = =4 | ) |
std::ostream & freedm::broker::device::operator<< | ( | std::ostream & | os, |
const DeviceInfo & | info | ||
) |
Outputs the device information structure to the passed stream.
os | The stream that the device information should output to. |
info | The device information to output to the stream. |
void freedm::broker::device::SetResult | ( | boost::shared_ptr< OptionalError > | status, |
const boost::system::error_code & | error | ||
) |
This function is meant to be used in conjunction with asynchronous calls to determine when a call has finished execution. Bind an asynchronous call to this function using an uninitialized boost::optional, and poll the first argument to test for completion.
status | The optional variable that will store the error code. |
error | The error code of an asynchronous call bound to this function. |
void freedm::broker::device::TimedRead | ( | ReadStream & | stream, |
const BufferSequence & | buffer, | ||
unsigned int | duration | ||
) |
A read that blocks until the buffer is full or a time duration expires.
stream | The read stream that will receive data. |
buffer | The buffer to store the result of the read. |
duration | The amount of time in milliseconds for the timeout. |
void freedm::broker::device::TimedReadUntil | ( | ReadStream & | stream, |
boost::asio::basic_streambuf< Allocator > & | buffer, | ||
const std::string & | delim, | ||
unsigned int | duration | ||
) |
A read that blocks until a delimiter is read or a time duration expires.
stream | The read stream that will receive delimited data. |
buffer | The buffer to store the reuslt of the read. |
delim | The delimiter that marks the end of the data. |
duration | The amount of time in milliseconds for the timeout. |
void freedm::broker::device::TimedWrite | ( | WriteStream & | stream, |
const BufferSequence & | buffer, | ||
unsigned int | duration | ||
) |
A write that blocks until either completion or a time duration expires.
stream | The write stream to receive the data. |
buffer | The buffered data to write to the stream. |
duration | The amount of time in milliseconds for the timeout. |
void freedm::broker::device::TimedWrite | ( | WriteStream & | stream, |
boost::asio::basic_streambuf< Allocator > & | buffer, | ||
unsigned int | duration | ||
) |
A write that blocks until either completion or a time duration expires.
stream | The write stream to receive the data. |
buffer | The buffered data to write to the stream. |
duration | The amount of time in milliseconds for the timeout. |
const SignalValue freedm::broker::device::NULL_COMMAND = std::pow(10, 8) |