11 #include <initializer_list> 13 namespace duds {
namespace hardware {
namespace interface {
41 std::shared_ptr<MasterSyncSerial>
mss;
47 typedef std::initializer_list<std::uint8_t>
ByteList;
102 const std::uint8_t * __restrict__ out,
103 std::uint8_t * __restrict__ in,
106 mss->transfer(out, in, bits);
130 const std::int8_t * __restrict__ out,
131 std::int8_t * __restrict__ in,
134 transfer((std::uint8_t*)out, (std::uint8_t*)in, bits);
158 std::uint8_t * __restrict__ in,
161 mss->transfer(out.begin(), in, bits);
179 mss->transmit(buff, bits);
197 transmit((std::uint8_t*)buff, bits);
232 mss->receive(buff, bits);
252 receive((std::uint8_t*)buff, bits);
267 mss->converseAlreadyOpen(conv);
void transfer(const ByteList &out, std::uint8_t *__restrict__ in, duds::general::Bits bits)
Sends and/or receives bits of data.
void receive(std::int8_t *buff, duds::general::Bits bits)
Receives bits of data using signed bytes for convenience.
void receive(std::uint8_t *buff, duds::general::Bits bits)
Receives bits of data.
void transmit(const std::int8_t *buff, duds::general::Bits bits)
Sends bits of data using signed bytes for convenience.
std::unique_ptr< MasterSyncSerialAccess > access()
Obtain access for communication; transitions the object from the ready (MssReady) to the open (MssOpe...
void converse(Conversation &conv)
Has a half-duplex Conversation with the connected device.
void transmit(const std::uint8_t *buff, duds::general::Bits bits)
Sends bits of data.
void transfer(const std::int8_t *__restrict__ out, std::int8_t *__restrict__ in, duds::general::Bits bits)
Sends and/or receives bits of data using signed bytes for convenience.
void stop()
Ends the conversation; transitions from the communicating state to the open state.
static std::wstring_convert< std::codecvt_utf8< char32_t >, char32_t > conv
String converter; UTF-8 to/from UTF-32.
void transmit(const ByteList &buff)
Sends bytes stored in a temporary value.
void start()
Starts a conversation; transitions from the open state to the communicating state.
Provides access for communicating using a MasterSyncSerial object.
std::shared_ptr< MasterSyncSerial > mss
The serial interface used by this access object.
~MasterSyncSerialAccess()
Ends the conversation and closes communication.
A class to assist with specifiying the sizes of data with scaling units, much like std::chrono::durat...
MasterSyncSerialAccess()
Makes a useless access object.
void retire(MasterSyncSerialAccess *acc)
Removes the access object from use.
MasterSyncSerialAccess(std::shared_ptr< MasterSyncSerial > m)
Constructs an access object; called by MasterSyncSerial::access().
void transfer(const std::uint8_t *__restrict__ out, std::uint8_t *__restrict__ in, duds::general::Bits bits)
Sends and/or receives bits of data.
std::initializer_list< std::uint8_t > ByteList
DataSize< 8 > Bytes
DataSize type for a size in bytes.
Represents a two-way conversation with a device.
void retire()
Ends the conversation and closes communication.