Seeed Grove ++  v0.0.1-2386
Linux C++ Library For Seeed Grove Devices
SG::SGpp Class Referencefinal

The SGpp class is the central class to the Seeed Grove ++ library. More...

#include <sg++.hpp>

Collaboration diagram for SG::SGpp:

Public Member Functions

 ~SGpp (void)
 Destructor. This automatically calls cleanup(). More...
 
SGppinitialize (void)
 Initialize Seeed Grove ++. More...
 
SGppcleanup (void)
 Cleanly shutdown (where possible) Seeed Grove ++. More...
 
bool is_initialized (void) const
 Determine if Seeed Grove ++ has been initialized. More...
 

Static Public Member Functions

static SGppget (void)
 Get the SGpp singleton. This will also indirectly ensure the Seeed Grove ++ library is initialized. More...
 

Public Attributes

GpioManagementgpio
 Access to GPIO functionality. More...
 

Detailed Description

The SGpp class is the central class to the Seeed Grove ++ library.

Instantiate the SGpp constructor by calling SG::SGpp::get() which will get the singleton. For example:

#include <SG/sg++.hpp>
int main(...)
{
...

The destructor will automatically call cleanup() when the static singleton SGpp object goes out of scope.

Constructor & Destructor Documentation

◆ ~SGpp()

SG::SGpp::~SGpp ( void  )

Destructor. This automatically calls cleanup().

References cleanup().

Here is the call graph for this function:

Member Function Documentation

◆ cleanup()

SG::SGpp & SG::SGpp::cleanup ( void  )

Cleanly shutdown (where possible) Seeed Grove ++.

This is called automatically by the destructor, or can be manually called. This method can be safely called multiple times.

See also
initialize()

References SG::GpioManagement::cleanup(), and gpio.

Referenced by sg_fatal_signal_handler(), SG::GpioManagement::~GpioManagement(), and ~SGpp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get()

◆ initialize()

SG::SGpp & SG::SGpp::initialize ( void  )

Initialize Seeed Grove ++.

This is called automatically by the constructor, or can be manually called. This method can be safely called multiple times.

See also
is_initialized()
cleanup()

Referenced by seeedgrove_example_application().

Here is the caller graph for this function:

◆ is_initialized()

bool SG::SGpp::is_initialized ( void  ) const
inline

Determine if Seeed Grove ++ has been initialized.

See also
initialize()
cleanup()

Member Data Documentation

◆ gpio


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