3 Copyright (C) 2011 Grame
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 Grame Research Laboratory, 9 rue du Garet, 69001 Lyon - France
31 #include "MessageDriven.h"
38 typedef class SMARTP
<RootNode
> SRootNode
;
40 //--------------------------------------------------------------------------
42 \brief a faust root node
44 A Faust root node handles the \c 'hello' message and provides support
45 for incoming osc signal data.
47 class RootNode
: public MessageDriven
49 int *fUPDIn
, *fUDPOut
, *fUDPErr
; // the osc port numbers (required by the hello method)
50 OSCIO
* fIO
; // an OSC IO controler
53 RootNode(const char *name
, OSCIO
* io
=0) : MessageDriven (name
, ""), fUPDIn(0), fUDPOut(0), fUDPErr(0), fIO(io
) {}
54 virtual ~RootNode() {}
57 static SRootNode
create (const char* name
, OSCIO
* io
=0) { return new RootNode(name
, io
); }
59 virtual bool accept( const Message
* msg
);
61 bool acceptSignal( const Message
* msg
); ///< handler for signal data
62 void hello (unsigned long ipdest
) const; ///< handler for the 'hello' message
63 void setPorts (int* in
, int* out
, int* err
);