Lab_interaccio/2014/VDOSSIER_DIL/OSCClient.h
2025-02-25 21:29:42 +01:00

48 lines
1 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
ArdOSC 2.1 - OSC Library for Arduino.
-------- Lisence -----------------------------------------------------------
ArdOSC
The MIT License
Copyright (c) 2009 - 2011 recotana( http://recotana.com ) All right reserved
*/
#ifndef ArdOSC_OSCClient2_h
#define ArdOSC_OSCClient2_h
#include "OSCcommon.h"
#include "OSCMessage.h"
#include "OSCEncoder.h"
#include "WiFlyHQ.h"
#define kDummyPortNumber 10000
class OSCClient{
private:
WiFly* wiFly;
OSCEncoder::OSCEncoder encoder;
long lastSendMillis; ///< used to make sure that the Wifly sends each message in a single package.
int wiFlyTimeoutMillis; ///< if we wait that long between messages, an UDP package is sent.
public:
OSCClient(WiFly* wiFly);
~OSCClient(void);
int send(OSCMessage *_message);
int sendInt(int value, char* adress); ///< send a single number to the specified adress conveniently
int sendFloat(float value, char* adress);///< send a single number to the specified adress conveniently
};
#endif