CSL
5.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
CRAM_Service.h
Go to the documentation of this file.
1
//
2
// CSL interface and main() function for use with CRAM: the CREATE Real-time Applications Manager
3
// See the copyright and acknowledgment of authors in the file COPYRIGHT
4
//
5
// The CSLService class is the wrapper used to manage CSL programs from CRAM.
6
// This file has the main() function that starts any of a number of different CSL services under the control of CRAM.
7
//
8
// Usage:
9
// CSL_Server service_name listener_port emergency_port CSL_function [-o UDP_IO-port] [-i RemoteFrameStream-in-IP/port]
10
// The name and l/e port arguments are used by the CRAM management system
11
// The CSL function is a string to select from the built-in play routines (see the list below)
12
// Examples
13
// CSL_Server CSL31 12345 12355 bells -- play bells sending sound out to the local server
14
// CSL_Server CSL31 12345 12355 speakers -o 33123 -- play voices listening for client requests on port 33123
15
// -- mix stereo sample streams from the two given servers
16
// CSL_Server CSL31 12345 12355 mixer -i 128.111.92.51 12445 -i 128.111.92.60 12445
17
//
18
// The CSL_Function selects from the various available services:
19
// bells texture of random FM bells
20
// noise swept filtered noise
21
// speakers phoneme streams
22
// mixer 8-in 2-out network mixer
23
//
24
// The optional arguments
25
// -o port-num -- for UDP_IO clients, to tell them their listener ports
26
// -i client-IP client-port -- for processors, to identify their inputs
27
// -a -- for auto-start (run stand-alone without waiting for CRAM start message)
28
//
29
// The mixer takes additional arguments to describe its clients
30
//
31
32
#ifndef __CSL_CRAM_INCLUDE__
33
#define __CSL_CRAM_INCLUDE__
34
35
#include "Server.h"
36
#include <stdarg.h>
// for va_arg, va_list, etc.
37
38
// Logger * mLogger;
39
40
namespace
csl {
41
42
using namespace
std;
43
using namespace
cram;
44
45
// The CSL CRAM Service class
46
47
class
CSLService
:
public
Server {
48
49
public
:
50
void
start(
void
);
// start method
51
void
stop(
void
);
// stop method
52
void
suspend(
void
);
// suspend method
53
void
resume(
void
);
// resume method
54
// set an option value
55
void
set_opt(
const
char
* nam,
const
char
* val);
56
57
// Constructors
58
CSLService
(
char
* name,
unsigned
short
lport,
unsigned
short
eport,
char
* which);
59
~
CSLService
();
60
61
pthread_t
mThread
;
// CSL test thread
62
char
*
mWhich
;
// type of CSL service
63
64
};
65
66
}
67
68
#endif
69
CSL
CRAM
CRAM_Service.h
Generated on Thu Nov 15 2012 22:01:09 for CSL by
1.8.1.1