SECOM
Overview Cluster Class Classes Index          Top Features

secom.abstract

Class COM_ABSTRACT_SETTINGS


Known direct descendants

COM_DEVICE_CONTROL_BLOCK

Features

Invariants

indexing

description

Control settings for an abstract serial communications device. Settings
will not be applied until you call set_control_settings on the device.

library

Serial Communications Library

copyright

Copyright (c) 2005, Brian E. Heilig

license

Eiffel Forum License v2 (see license.txt)

deferred class COM_ABSTRACT_SETTINGS

feature -- Access

baud_rate: INTEGER

-- Device baud rate

deferred

data_bits: INTEGER

-- Number of bits per data word

deferred

parity: INTEGER

-- Parity scheme in use for received and transmitted data

deferred

stop_bits: INTEGER

-- Number of stop bits per data word

deferred

feature -- Comparison

is_equal (other: like Current): BOOLEAN

-- Is other attached to an object considered equal
-- to current object?

ensure then

definition: Result implies ( baud_rate = other.baud_rate and parity = other.parity and stop_bits = other.stop_bits and data_bits = other.data_bits)

feature -- Status report

is_parity_checked: BOOLEAN

-- Check receive data for parity errors?

deferred

is_valid_baud (a_baud: INTEGER): BOOLEAN

-- Is a_baud a valid baud rate? True only indicates the
-- operating system supports this rate. The device may not.

deferred

is_valid_data_bits (a_data_bits: INTEGER): BOOLEAN

-- Is a_data_bits a valid data bits setting?

deferred

is_valid_parity (a_parity: INTEGER): BOOLEAN

-- Is a_parity a valid parity setting?

deferred

is_valid_stop_bits (a_stop_bit: INTEGER): BOOLEAN

-- Is a_stop_bit a valid stop bits setting?

deferred

feature -- Status setting

set_parity_check (a_value: BOOLEAN)

-- Set is_parity_checked to a_value

deferred

ensure

parity_check_set: is_parity_checked = a_value

feature -- Conversion

to_baud_rate (a_baud_rate: INTEGER): INTEGER

-- Converts a_baud_rate in symbols per second
-- to a baud rate setting

deferred

to_data_bits (a_data_bits: INTEGER): INTEGER

-- Converts a_data_bits in number of data bits to a data bits setting

deferred

to_parity (a_parity_char: CHARACTER): INTEGER

-- Converts a_parity_char to a parity setting

deferred

to_stop_bits (a_stop_bits: INTEGER): INTEGER

-- Converts a_stop_bits in number of stop bits to a stop bits setting

deferred

feature -- Element Change

fill_from_device (dev: COM_ABSTRACT_DEVICE)

-- Initialize this object with settings from dev.

require

exists: dev /= Void
handle_available: dev.is_open
deferred

ensure

equal: dev.control_settings.is_equal (Current)

set_baud_rate (a_baud_rate: INTEGER)

-- Set baud_rate with a_baud_rate

require

valid: is_valid_baud (a_baud_rate)
deferred

ensure

baud_rate_set: baud_rate = a_baud_rate

set_data_bits (a_data_bits: INTEGER)

-- Set data_bits to a_data_bits

require

valid: is_valid_data_bits (a_data_bits)
deferred

ensure

data_bits_set: data_bits = a_data_bits

set_defaults

-- Change all settings to default values.
-- Useful to remove any esoteric settings
-- that might be effecting communication

deferred

set_parity (a_parity: INTEGER)

-- Set parity to a_parity

require

valid: is_valid_parity (a_parity)
deferred

ensure

parity_set: parity = a_parity

set_stop_bits (a_stop_bits: INTEGER)

-- Set stop_bits to a_stop_bits

require

valid: is_valid_stop_bits (a_stop_bits)
deferred

ensure

stop_bits_set: stop_bits = a_stop_bits

invariant


Documentation generated by edoc