blob: 6e84b0e3bab7eaf0202b44928b450a9c21c23565 (
plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
|
Modem: module
{
PATH: con "/dis/ip/nppp/modem.dis";
ModemInfo: adt {
path: string;
init: string;
country: string;
other: string;
errorcorrection:string;
compression: string;
flowctl: string;
rateadjust: string;
mnponly: string;
dialtype: string;
hangup: string;
};
Device: adt {
lock: ref Lock->Semaphore;
# modem stuff
ctl: ref Sys->FD;
data: ref Sys->FD;
local: string;
remote: string;
status: string;
speed: int;
t: ModemInfo;
trace: int;
# input reader
avail: array of byte;
pid: int;
new: fn(i: ref ModemInfo, trace: int): ref Device;
dial: fn(m: self ref Device, number: string): string;
getc: fn(m: self ref Device, msec: int): int;
getinput: fn(m: self ref Device, n: int): array of byte;
send: fn(m: self ref Device, x: string): string;
close: fn(m: self ref Device): ref Sys->Connection;
onhook: fn(m: self ref Device);
};
init: fn(): string;
};
|