Jump to content

MODEMSTATUS: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
No edit summary
Line 1: Line 1:
== MODEMSTATUS ==
== MODEMSTATUS ==
Modem Control data structure.  
Modem Control data structure.  


=== Type ===  
=== Type ===  
 
  [[BYTE]]  fbModemOn
  [[OS2 API:DataType:BYTE|BYTE]]  fbModemOn
  BYTE  fbModemOff
  [[OS2 API:DataType:BYTE|BYTE]] fbModemOff


==== C Declaration Method ====
==== C Declaration Method ====
typedef struct
typedef struct


=== Fields ===
=== Fields ===
 
;fbModemOn:Modem Control Signals ON Mask.
fbModemOn Modem Control Signals ON Mask.
:The physical device driver sets the modem control signals as defined in this field. Bit 0 is DTR; bit 1 is RTS. If any other bits are set/reset by the masks, then a general failure error results. The OFF mask contains a mask (with all bits equal to 0) to turn the modem control signal off. The ON mask contains a mask (with all bits equal to 1) to turn the modem control signal on. If the Parameter Packet indicates both turn off and turn on on the same bit, the bit will be turned on. For example:  
            The physical device driver sets the modem control signals as defined
┌─────────┬─────────┬───────────────┐
            in this field. Bit 0 is DTR; bit 1 is RTS. If any other bits are
│Mask ON  │Mask OFF │Description    │
            set/reset by the masks, then a general failure error results. The
├─────────┼─────────┼───────────────┤
            OFF mask contains a mask (with all bits equal to 0) to turn the
│  01h  │  FFh  │Set DTR        │
            modem control signal off. The ON mask contains a mask (with all bits
├─────────┼─────────┼───────────────┤
            equal to 1) to turn the modem control signal on. If the Parameter
│  00h  │  FEh  │Clear DTR      │
            Packet indicates both turn off and turn on on the same bit, the bit
├─────────┼─────────┼───────────────┤
            will be turned on. For example:  
│  02h  │  FFh  │Set RTS        │
            ┌─────────┬─────────┬───────────────┐
├─────────┼─────────┼───────────────┤
            │Mask ON  │Mask OFF │Description    │
│  00h  │  FDh  │Clear RTS      │
            ├─────────┼─────────┼───────────────┤
├─────────┼─────────┼───────────────┤
            │  01h  │  FFh  │Set DTR        │
│  03h  │  FFh  │Set DTR and RTS│
            ├─────────┼─────────┼───────────────┤
├─────────┼─────────┼───────────────┤
            │  00h  │  FEh  │Clear DTR      │
│  00h  │  FCh  │Clear DTR and  │
            ├─────────┼─────────┼───────────────┤
│        │        │RTS            │
            │  02h  │  FFh  │Set RTS        │
└─────────┴─────────┴───────────────┘
            ├─────────┼─────────┼───────────────┤
:If DTR Control mode input handshaking, RTS Control mode input handshaking or toggling on transmit is set, then this request cannot try to change the state of the modem control signals, that are being used for input handshaking or toggling on transmit. If the request tries to modify a modem control signal that is being used for input handshaking or toggling on transmit, a general failure error results.  
            │  00h  │  FDh  │Clear RTS      │
;fbModemOff:Modem Control Signals OFF Mask.
            ├─────────┼─────────┼───────────────┤
:See Modem Control Signals ON Mask above.
            │  03h  │  FFh  │Set DTR and RTS│
            ├─────────┼─────────┼───────────────┤
            │  00h  │  FCh  │Clear DTR and  │
            │        │        │RTS            │
            └─────────┴─────────┴───────────────┘
            If DTR Control mode input handshaking, RTS Control mode input
            handshaking or toggling on transmit is set, then this request cannot
            try to change the state of the modem control signals, that are being
            used for input handshaking or toggling on transmit. If the request
            tries to modify a modem control signal that is being used for input
            handshaking or toggling on transmit, a general failure error
            results.  
 
fbModemOff Modem Control Signals OFF Mask.
            See Modem Control Signals ON Mask above.
 
 
 
 
[[OS2_API | Back to OS/2 API]]
 


[[Category:The OS/2 API Project]]
[[Category:Data type]]

Revision as of 17:56, 1 November 2016

MODEMSTATUS

Modem Control data structure.

Type

BYTE  fbModemOn
BYTE  fbModemOff

C Declaration Method

typedef struct

Fields

fbModemOn
Modem Control Signals ON Mask.
The physical device driver sets the modem control signals as defined in this field. Bit 0 is DTR; bit 1 is RTS. If any other bits are set/reset by the masks, then a general failure error results. The OFF mask contains a mask (with all bits equal to 0) to turn the modem control signal off. The ON mask contains a mask (with all bits equal to 1) to turn the modem control signal on. If the Parameter Packet indicates both turn off and turn on on the same bit, the bit will be turned on. For example:
┌─────────┬─────────┬───────────────┐
│Mask ON  │Mask OFF │Description    │
├─────────┼─────────┼───────────────┤
│   01h   │   FFh   │Set DTR        │
├─────────┼─────────┼───────────────┤
│   00h   │   FEh   │Clear DTR      │
├─────────┼─────────┼───────────────┤
│   02h   │   FFh   │Set RTS        │
├─────────┼─────────┼───────────────┤
│   00h   │   FDh   │Clear RTS      │
├─────────┼─────────┼───────────────┤
│   03h   │   FFh   │Set DTR and RTS│
├─────────┼─────────┼───────────────┤
│   00h   │   FCh   │Clear DTR and  │
│         │         │RTS            │
└─────────┴─────────┴───────────────┘
If DTR Control mode input handshaking, RTS Control mode input handshaking or toggling on transmit is set, then this request cannot try to change the state of the modem control signals, that are being used for input handshaking or toggling on transmit. If the request tries to modify a modem control signal that is being used for input handshaking or toggling on transmit, a general failure error results.
fbModemOff
Modem Control Signals OFF Mask.
See Modem Control Signals ON Mask above.