Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
Loading...
Searching...
No Matches
AnalogModem.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2013 Raritan Inc. All rights reserved.
4 */
5
6#ifndef __ANALOGMODEM_IDL__
7#define __ANALOGMODEM_IDL__
8
9#include <Event.idl>
10
11/** Serial Ports */
12module serial {
13
14 /**
15 * Interface for communication with an analog modem attached
16 * to a serial port
17 */
18 interface AnalogModem {
19 /**
20 * Error codes
21 */
22 constant int SUCCESS = 0; ///< No error
23 constant int ERR_INVALID_VALUE = 1; ///< Invalid argument
24
25 structure Settings {
26 boolean dialInEnabled; ///< Whether dial-in to device is enabled
27 int ringsUntilAnswer; ///< Number of rings until incoming call is answered
28 };
29
30 /**
31 * Dial-in event
32 */
33 valueobject DialInEvent extends idl.Event {
34 string number; ///< The caller's phone number
35 };
36
37 /**
38 * An event that's emitted when a dial-in call was answered
39 */
40 valueobject CallReceivedEvent extends DialInEvent {
41 };
42
43 /**
44 * An event that's emitted when a dial-in call was hung up
45 */
46 valueobject CallEndedEvent extends DialInEvent {
47 boolean disconnectedRemotely; ///< If true, the call was disconnected by the caller
48 ///< If false, the call was disconnected locally,
49 ///< e.g. due to a connection failure
50 };
51
52 /**
53 * @brief Get modem settings
54 *
55 * @return -- Current modem settings
56 */
58
59 /**
60 * @brief Set modem settings
61 *
62 * @param settings -- New settings
63 *
64 * @return SUCCESS -- on success
65 * @return ERR_INVALID_VALUE -- if any passed value was invalid
66 */
67 int setSettings(in Settings settings);
68 };
69}
70
71#endif /* __ANALOGMODEM_IDL__ */
Interface for communication with an analog modem attached to a serial port.
Definition: AnalogModem.idl:18
int setSettings(in Settings settings)
Set modem settings.
Settings getSettings()
Get modem settings.
Basic IDL definitions.
Definition: Event.idl:10
Serial Ports.
Definition: AnalogModem.idl:12
Common base for all events.
Definition: Event.idl:13
An event that's emitted when a dial-in call was hung up.
Definition: AnalogModem.idl:46
boolean disconnectedRemotely
If true, the call was disconnected by the caller If false, the call was disconnected locally,...
Definition: AnalogModem.idl:47
An event that's emitted when a dial-in call was answered.
Definition: AnalogModem.idl:40
string number
The caller's phone number.
Definition: AnalogModem.idl:34
int ringsUntilAnswer
Number of rings until incoming call is answered.
Definition: AnalogModem.idl:27
boolean dialInEnabled
Whether dial-in to device is enabled.
Definition: AnalogModem.idl:26