Loom 4 v4.5
Arduino library for Internet of Things Rapid Prototyping in environmental sensing
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
Loom_Max Class Reference

#include <Loom_Max.h>

Inheritance diagram for Loom_Max:
Inheritance graph
[legend]
Collaboration diagram for Loom_Max:
Collaboration graph
[legend]

Classes

struct  UDPDeletor
 Close the socket and delete the UDP object when the unique ptr dissapears. More...
 

Public Types

using UDPPtr = std::unique_ptr< UDP, UDPDeletor >
 

Public Member Functions

void initialize () override
 
bool publish ()
 
bool subscribe ()
 
 Loom_Max (Manager &man, Loom_WIFI &wifi)
 
template<typename T >
 Loom_Max (Manager &man, Loom_WIFI &wifi, T *firstAct)
 
template<typename T , typename... Args>
 Loom_Max (Manager &man, Loom_WIFI &wifi, T *firstAct, Args *... additionalActuators)
 
- Public Member Functions inherited from Module
 Module (const char *modName)
 
void setModuleName (const char *modName)
 
virtual const char * getModuleName ()
 
virtual void printModuleName (const char *message)
 
virtual void initialize ()=0
 
virtual void measure ()=0
 
virtual void package ()=0
 
virtual void power_up ()=0
 
virtual void power_down ()=0
 
virtual void display_data ()
 

Protected Member Functions

void measure () override
 
void power_up () override
 
void power_down () override
 
void package () override
 

Additional Inherited Members

- Public Attributes inherited from Module
bool moduleInitialized = true
 
int module_address = -1
 

Detailed Description

Class used to handle communication with Max MSP to control devices remotely

Author
Will Richards

Constructor & Destructor Documentation

◆ Loom_Max() [1/3]

Loom_Max::Loom_Max ( Manager man,
Loom_WIFI wifi 
)

Construct a new instance of the the Max MSP Pub/Sub protocol

Parameters
manReference to the manager
wifiReference to the Wifi manager for getting UDP communication streams
modeHow traffic is handled between the feather and the max client (CLIENT = Remote Router, AP = Access point on the feather)

◆ Loom_Max() [2/3]

template<typename T >
Loom_Max::Loom_Max ( Manager man,
Loom_WIFI wifi,
T *  firstAct 
)
inline

Construct a new instance of the the Max MSP Pub/Sub protocol

Parameters
manReference to the manager
wifiReference to the Wifi manager for getting UDP communication streams
modeHow traffic is handled between the feather and the max client (CLIENT = Remote Router, AP = Access point on the feather)
firstActThe first actuator to add to the list

◆ Loom_Max() [3/3]

template<typename T , typename... Args>
Loom_Max::Loom_Max ( Manager man,
Loom_WIFI wifi,
T *  firstAct,
Args *...  additionalActuators 
)
inline

Construct a new instance of the the Max MSP Pub/Sub protocol

Parameters
manReference to the manager
wifiReference to the Wifi manager for getting UDP communication streams
modeHow traffic is handled between the feather and the max client (CLIENT = Remote Router, AP = Access point on the feather)
firstActThe first actuator to add to the list
additionalActuatorsThis takes any number of actuators

Member Function Documentation

◆ initialize()

void Loom_Max::initialize ( )
overridevirtual

Initialize each actuator

Implements Module.

◆ measure()

void Loom_Max::measure ( )
inlineoverrideprotectedvirtual

Implements Module.

◆ package()

void Loom_Max::package ( )
overrideprotectedvirtual

Implements Module.

◆ power_down()

void Loom_Max::power_down ( )
inlineoverrideprotectedvirtual

Implements Module.

◆ power_up()

void Loom_Max::power_up ( )
inlineoverrideprotectedvirtual

Implements Module.

◆ publish()

bool Loom_Max::publish ( )

Send the UDP packet from the device to the server

◆ subscribe()

bool Loom_Max::subscribe ( )

Retrieve the response on the UDP stream if one is available


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