COSMOS core  1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
Cosmos::I2C Class Reference

#include <i2c.h>

Collaboration diagram for Cosmos::I2C:

Public Member Functions

 I2C (string bus, uint8_t address, double delay=2e-4)
 
 ~I2C ()
 
int32_t get_funcs ()
 
int32_t set_address (uint64_t address)
 
int32_t send (string data)
 
int32_t send (uint8_t *data, size_t len)
 
int32_t send (vector< uint8_t > data)
 
int32_t receive (string &data)
 
int32_t receive (uint8_t *data, size_t len)
 
int32_t receive (vector< uint8_t > &data)
 
int32_t get_error ()
 
int32_t get_fh ()
 

Private Attributes

struct {
   string   bus
 
   uint8_t   address
 
   int   fh = -1
 
   uint64_t   funcs
 
   bool   connected = false
 
   double   delay = 1e-4
 
handle
 
int32_t error
 

Member Function Documentation

int32_t Cosmos::I2C::get_funcs ( )
int32_t Cosmos::I2C::set_address ( uint64_t  address)

Member Data Documentation

string Cosmos::I2C::bus
uint8_t Cosmos::I2C::address
int Cosmos::I2C::fh = -1
uint64_t Cosmos::I2C::funcs
bool Cosmos::I2C::connected = false
double Cosmos::I2C::delay = 1e-4
struct { ... } Cosmos::I2C::handle
int32_t Cosmos::I2C::error
private

The documentation for this class was generated from the following files: