File: ask1.cpp

package info (click to toggle)
icomlib 1.0.1-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,652 kB
  • ctags: 1,363
  • sloc: cpp: 4,849; makefile: 536; sh: 181; ansic: 145
file content (35 lines) | stat: -rw-r--r-- 767 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <stdio.h>

#include <pcrdef.h>
#include <pcomm.h>

#include <string.h>

void main ()
{
	PComm *elmo = new PComm ("/dev/ttyS0");
	char message[255];
	/*elmo->PCTell(PCRINITM);
	fprintf(stderr, "tell: %s\n", PCRINITM);
	elmo->PCClose();
	elmo->PCOpen("/dev/ttyS0");

	char frequency[256];
	strcpy(frequency, PCRFRQ);
	strcat(frequency, "0162475000050200");
	elmo->PCTell(frequency);
	fprintf(stderr, "tell: %s\n", frequency);
	elmo->PCHear(message);
	fprintf(stderr, "hear: %s\n", message);*/

	elmo->PCTell(PCRVOLON);
	fprintf(stderr, "tell: %s\n", PCRVOLON);
	elmo->PCHear(message);
	fprintf(stderr, "hear: %s\n", message);

	elmo->PCAsk(PCRQRST);
	fprintf(stderr, "tell: %s\n", PCRQRST);
	elmo->PCHear(message);
	fprintf(stderr, "hear: %s\n", message);
	
}