SECOM
Overview Cluster Class Classes Index          Top Features

secom.windows

Class COM_DEVICE


Direct ancestors

KL_SHARED_EXCEPTIONS, COM_ABSTRACT_DEVICE, MEMORY, COM_SHARED_WINDOWS_ERROR

Features

Invariants

indexing

description

Objects that perform I/O operations on a communications device.

library

Serial Communications Library

copyright

Copyright (c) 2005, Brian E. Heilig

license

Eiffel Forum License v2 (see license.txt)

class COM_DEVICE

inherit

COM_ABSTRACT_DEVICE
MEMORY
DISPOSABLE

feature -- Access

control_settings: COM_DEVICE_CONTROL_BLOCK

-- Current control parameters for this device

handle: POINTER

-- Handle to communications resource

properties: COM_PROPERTIES

-- Information about the device driver

ensure

exists: Result /= Void

status: COM_STATUS

-- Line driver status parameters

ensure

exists: Result /= Void

timeouts: COM_TIMEOUTS

-- Current timeout properties for this device

feature -- Status report

is_open: BOOLEAN

-- Is the device open for reading and writing?

feature -- Status setting

close

-- Close the device.

open

-- Open the device.

ensure then

handle_available_implies_open: handle /= Invalid_handle_value implies is_open

feature -- Element change

set_control_settings (a_settings: COM_DEVICE_CONTROL_BLOCK)

-- Configures the device according to the specifications in a_settings.

set_control_string (a_control_string: STRING)

-- Configure the device using a_control_string, e.g. "9600,n,8,1"

require

exists: a_control_string /= Void
handle_available: is_open

set_timeouts (a_timeouts: COM_TIMEOUTS)

-- Sets the timeouts parameters to those in a_timeouts

feature -- Removal

dispose

-- If the device is still open then close it

feature -- Input

read_data (data: POINTER; count: INTEGER)

-- Read count bytes into the data buffer. Set last_read_count
-- to the number of bytes read. Set timed_out if less than count
-- bytes were read. See timeouts to determine when read will
-- be completed.

feature -- Output

put_data (data: POINTER; count: INTEGER)

-- Write count bytes of data to the device. Set
-- last_write_count to the number of bytes written.

invariant


Documentation generated by edoc