Loading...
Searching...
No Matches
AnalogModem.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2013 Raritan Inc. All rights reserved.
*/
#ifndef __ANALOGMODEM_IDL__
#define __ANALOGMODEM_IDL__
#include <Event.idl>
/** Serial Ports */
module serial {
/**
* Interface for communication with an analog modem attached
* to a serial port
*/
interface AnalogModem {
/**
* Error codes
*/
constant int SUCCESS = 0; ///< No error
constant int ERR_INVALID_VALUE = 1; ///< Invalid argument
structure Settings {
boolean dialInEnabled; ///< Whether dial-in to device is enabled
int ringsUntilAnswer; ///< Number of rings until incoming call is answered
};
/**
* Dial-in event
*/
valueobject DialInEvent extends idl.Event {
string number; ///< The caller's phone number
};
/**
* An event that's emitted when a dial-in call was answered
*/
valueobject CallReceivedEvent extends DialInEvent {
};
/**
* An event that's emitted when a dial-in call was hung up
*/
valueobject CallEndedEvent extends DialInEvent {
boolean disconnectedRemotely; ///< If true, the call was disconnected by the caller
///< If false, the call was disconnected locally,
///< e.g. due to a connection failure
};
/**
* @brief Get modem settings
*
* @return -- Current modem settings
*/
Settings getSettings();
/**
* @brief Set modem settings
*
* @param settings -- New settings
*
* @return SUCCESS -- on success
* @return ERR_INVALID_VALUE -- if any passed value was invalid
*/
int setSettings(in Settings settings);
};
}
#endif /* __ANALOGMODEM_IDL__ */
serial::AnalogModem
Interface for communication with an analog modem attached to a serial port.
Definition AnalogModem.idl:18
serial::AnalogModem::ERR_INVALID_VALUE
constant int ERR_INVALID_VALUE
Invalid argument.
Definition AnalogModem.idl:23
serial::AnalogModem::SUCCESS
constant int SUCCESS
Error codes.
Definition AnalogModem.idl:22
serial::AnalogModem::setSettings
int setSettings(in Settings settings)
Set modem settings.
serial::AnalogModem::getSettings
Settings getSettings()
Get modem settings.
idl
Basic IDL definitions.
Definition Event.idl:10
serial
Serial Ports.
Definition AnalogModem.idl:12
idl::Event
Common base for all events.
Definition Event.idl:13
serial::AnalogModem::CallEndedEvent
An event that's emitted when a dial-in call was hung up.
Definition AnalogModem.idl:46
serial::AnalogModem::CallEndedEvent::disconnectedRemotely
boolean disconnectedRemotely
If true, the call was disconnected by the caller If false, the call was disconnected locally,...
Definition AnalogModem.idl:47
serial::AnalogModem::CallReceivedEvent
An event that's emitted when a dial-in call was answered.
Definition AnalogModem.idl:40
serial::AnalogModem::DialInEvent
Dial-in event.
Definition AnalogModem.idl:33
serial::AnalogModem::DialInEvent::number
string number
The caller's phone number.
Definition AnalogModem.idl:34
serial::AnalogModem::Settings
Definition AnalogModem.idl:25
serial::AnalogModem::Settings::ringsUntilAnswer
int ringsUntilAnswer
Number of rings until incoming call is answered.
Definition AnalogModem.idl:27
serial::AnalogModem::Settings::dialInEnabled
boolean dialInEnabled
Whether dial-in to device is enabled.
Definition AnalogModem.idl:26