4337 lines
158 KiB
HTML
Executable File
4337 lines
158 KiB
HTML
Executable File
<! This document generated using mif2html Version 1.0 - Walt Akers - 1996 !>
|
|
<head>
|
|
<title>CDEV Documentation</title>
|
|
</head>
|
|
|
|
<body bgcolor="#E0E0FF">
|
|
|
|
<body>
|
|
<! ************************ FILE : cdevCollectionDesignTITLE.mif *****************************!>
|
|
<br><hr><br>
|
|
<table width=100%>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start ADDRESS ***!><font size=+12 color=Black><strong><em>
|
|
cdevCollection Device
|
|
Requirements and Design
|
|
<!*** Finish ADDRESS ***!></p></strong></em></font>
|
|
<!*** Start ADDRESS-VERSION ***!><font size=+2 color=Black>
|
|
|
|
</p>
|
|
Walt Akers, Chip Watson, Jie Chen
|
|
</p>
|
|
|
|
</p>
|
|
Version 1.5 December 9, 1996
|
|
</p>
|
|
|
|
</p>
|
|
TJNAF - Thomas Jefferson National Accelerator Facility
|
|
</p>
|
|
|
|
<!*** Finish ADDRESS-VERSION ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
<! *************************** TABLE OF CONTENTS ****************************!>
|
|
<br><hr><br>
|
|
<table width=100%>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top align=center>
|
|
<!*** Start CLASS-TOC-TITLE ***!><font size=+3><strong>
|
|
Table of Contents
|
|
<!*** Finish CLASS-TOC-TITLE ***!></p></strong></font>
|
|
</td></tr>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<table>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
1.
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF1">cdevCollection Class Design</a>
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF2">Purpose of the Class</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF3">Requirements of the Class</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF4">Method Overview of the Class</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF5">cdevCollection</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF6">~cdevCollection</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF7">getRequestObject</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF8">attachRef/attachPtr</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF9">detach</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF10">className</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF11">add</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF12">add</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF13">add</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF14">add</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF15">addRegexp</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF16">remove</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF17">remove</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF18">remove</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF19">remove</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF20">removeRegexp</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
2.
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF21">cdevCollectionRequest Class Design</a>
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF22">Purpose of the Class</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF23">Requirements of the Class</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF24">Method Overview of the Class</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF25">constructor</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF26">destructor</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF27">attachPtr</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF28">className</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
3.
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF29">cdevGrpCollectionRequest Class Design</a>
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF30">Purpose of the Class</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF31">Requirements of the Class</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF32">Attribute Overview of the Class</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF33">sendStatus</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF34">sendCheckSum</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF35">collections</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF36">nCollections</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF37">requestOrder</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF38">nRequests</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF39">format</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF40">Method Overview of the Class</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF41">constructor </a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF42">destructor</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF43">getState</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF44">getAccess</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF45">setContext</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF46">send</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF47">sendNoBlock</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF48">sendCallback</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF49">className</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
4.
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF50">cdevDefCollectionRequest Class Design</a>
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF51">Purpose of the Class</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF52">Requirements of the Class</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF53">Attribute Overview of the Class</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF54">sendStatus</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF55">sendCheckSum</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF56">requests</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF57">nRequests</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF58">format</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF59">Method Overview of the Class</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF60">constructor </a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF61">destructor</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF62">getState</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF63">getAccess</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF64">setContext</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF65">send</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF66">sendNoBlock</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF67">sendCallback</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_NAMETOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF68">className</a>
|
|
<!*** Finish FUNC_NAMETOC ***!><br></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
5.
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF69">Defining cdevCollections in the CDEV DDL File</a>
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF70">Overview</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
6.
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF71">Elementary Commands of the cdevCollection</a>
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF72">Attaching to a cdevCollection</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF73">Detaching from a cdevCollection</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF74">Adding Devices to a cdevCollection</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF75">Adding a Single Device to a cdevCollection</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF76">Adding Multiple Devices to a cdevCollection</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF77">Adding an Array of Devices to a cdevCollection</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF78">Adding a NULL-Terminated Array of Devices to a cdevCollection</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF79">Adding Devices to a cdevCollection Using Regular Expressions</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF80">Removing a Single Device from a cdevCollection</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF81">Removing Multiple Devices from a cdevCollection</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF82">Removing an Array of Devices from a cdevCollection</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF83">Removing a NULL-Terminated Array of Devices from a cdevCollection</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF84">Removing Devices from a cdevCollection Using Regular Expressions</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF85">Getting a List of Devices from a cdevCollection</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
7.
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevCollectionDesign.html#TOCREF86">Restrictions of the cdevCollection Device </a>
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
</table>
|
|
<! **************************** LIST OF FIGURES *****************************!>
|
|
<br><hr><br>
|
|
<table width=100%>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top align=center>
|
|
<!*** Start CLASS-LOF-TITLE ***!><font size=+3><strong>
|
|
List of Figures
|
|
<!*** Finish CLASS-LOF-TITLE ***!></p></strong></font>
|
|
</td></tr>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 1:
|
|
<a href="cdevCollectionDesign.html#LOFREF1">Object Inheritance Hierarchy of the cdevCollection Class</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 2:
|
|
<a href="cdevCollectionDesign.html#LOFREF2">Object Model of the cdevCollection Class</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 3:
|
|
<a href="cdevCollectionDesign.html#LOFREF3">Object Inheritance Hierarchy of the cdevCollectionRequest Class</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 4:
|
|
<a href="cdevCollectionDesign.html#LOFREF4">Object Model of the cdevCollectionRequest Class</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 5:
|
|
<a href="cdevCollectionDesign.html#LOFREF5">Object Inheritance Hierarchy of the cdevGrpCollectionRequest Class</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 6:
|
|
<a href="cdevCollectionDesign.html#LOFREF6">Object Model of the cdevGrpCollectionRequest Class</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 7:
|
|
<a href="cdevCollectionDesign.html#LOFREF7">Object Inheritance Hierarchy of the cdevDefCollectionRequest Class</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 8:
|
|
<a href="cdevCollectionDesign.html#LOFREF8">Object Model of the cdevDefCollectionRequest Class</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 9:
|
|
<a href="cdevCollectionDesign.html#LOFREF9">cdevCollection Definition in the CDEV DDL File</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 10:
|
|
<a href="cdevCollectionDesign.html#LOFREF10">Attach to a cdevCollection using attachPtr and attachRef</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 11:
|
|
<a href="cdevCollectionDesign.html#LOFREF11">Detach from a cdevCollection using detach</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 12:
|
|
<a href="cdevCollectionDesign.html#LOFREF12">Adding a single device to a cdevCollection</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 13:
|
|
<a href="cdevCollectionDesign.html#LOFREF13">Adding multiple devices to a cdevCollection</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 14:
|
|
<a href="cdevCollectionDesign.html#LOFREF14">Adding an array of devices to a cdevCollection</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 15:
|
|
<a href="cdevCollectionDesign.html#LOFREF15">Adding a NULL-terminated array of devices to a cdevCollection</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 16:
|
|
<a href="cdevCollectionDesign.html#LOFREF16">Adding a device to a cdevCollection using regular expressions</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 17:
|
|
<a href="cdevCollectionDesign.html#LOFREF17">Removing a single device from a cdevCollection</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 18:
|
|
<a href="cdevCollectionDesign.html#LOFREF18">Removing multiple devices from a cdevCollection</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 19:
|
|
<a href="cdevCollectionDesign.html#LOFREF19">Removing an array of devices from a cdevCollection</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 20:
|
|
<a href="cdevCollectionDesign.html#LOFREF20">Removing a NULL-terminated array of devices from a cdevCollection</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 21:
|
|
<a href="cdevCollectionDesign.html#LOFREF21">Removing devices from a cdevCollection using regular expressions</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 22:
|
|
<a href="cdevCollectionDesign.html#LOFREF22">Getting a list of devices from a cdevCollection</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
</td></tr>
|
|
</table>
|
|
<! ************************ FILE : ./cdevCollectionDesign.mif *****************************!>
|
|
<br><hr><br>
|
|
<table width=100%>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
1.
|
|
<!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
<a name="TOCREF1">
|
|
cdevCollection Class Design
|
|
</a> <!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF2">
|
|
Purpose of the
|
|
Class
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
The cdevCollection class provides a mechanism for sending a message to a collection
|
|
of named devices. The object inheritance hierarchy of the cdevCollection is described
|
|
in the following object diagram.
|
|
</p>
|
|
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 1:
|
|
<a name="LOFREF1">
|
|
Object Inheritance Hierarchy of the cdevCollection Class
|
|
<AFrame 8>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF3">
|
|
Requirements of
|
|
the Class
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
A <em>cdevCollection</em> is a <em>cdevDevice</em> and is a named entity within the CDEV system
|
|
of objects.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The name of the <em>cdevCollection</em> must be unique within the CDEV system of
|
|
objects.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
Only one instance of a named <em>cdevCollection</em> may exist within an executing
|
|
application.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The <em>cdevCollection</em> object contains a single linked list of device names. These
|
|
device names define the collection.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
A <em>cdevCollection</em> object may be defined in the <em>CDEV DDL</em> file or may be
|
|
dynamically created at run-time.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The <em>CDEV DDL</em> definition of a <em>cdevCollection</em> object contains the names of all
|
|
device names that comprise the object. However, names may be added to this list
|
|
after it has been instantiated.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
Device names may be added to or removed from a <em>cdevCollection</em> object using
|
|
the <em>add</em> and <em>remove</em> methods of the <em>cdevCollection</em> class.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The component device names of a <em>cdevCollection</em> object may be added or
|
|
removed until the first message has been sent to the <em>cdevCollection</em>, after which
|
|
the collection of device names cannot be modified.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
A device name can only occur once within a <em>cdevCollection</em> object.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
When a device name string is added to the <em>cdevCollection</em> object using the <em>add</em>
|
|
method, the method makes a copy of the string. The original string remains the
|
|
property of the caller.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
When a device name string is removed from the <em>cdevCollection</em> object using the
|
|
remove method, the string that was generated when the device name was added
|
|
will be automatically deleted.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
When the <em>cdevCollection</em> object is destroyed, it is responsible for deleting any of
|
|
the device name strings that it has allocated.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The <em>getRequestObject</em> method of a <em>cdevCollection</em> object returns a
|
|
<em>cdevCollectionRequest</em> object. This object inherits from (and is in the form of) a
|
|
<em>cdevRequestObject</em> object.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
A <em>cdevCollection</em> object inherits its <em>send, sendCallback and sendNoBlock</em>
|
|
functionality from the <em>cdevDevice</em> object. This functionality should be automatic
|
|
because the <em>cdevDevice</em> object calls the <em>getRequestObject</em> method to obtain a
|
|
request object for the device/message combination associated with the request.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 2:
|
|
<a name="LOFREF2">
|
|
Object Model of the cdevCollection Class
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
methods:
|
|
cdevCollection (char *, cdevSystem &)
|
|
~cdevCollection (void) :{virtual}
|
|
getRequestObject (char *, cdevRequestObject *&) :{virtual} int
|
|
|
|
attachRef (char *) :{static} cdevCollection &
|
|
attachPtr (char *) :{static} cdevCollection *
|
|
attachRef (char *, cdevSystem &) :{static} cdevCollection *
|
|
attachPtr (char *, cdevSystem &) :{static} cdevCollection &
|
|
detach (cdevCollection &) :{static} void
|
|
detach (cdevCollection *) :{static} void
|
|
className (void) :{virtual} char *
|
|
add (char *) : int
|
|
add (int, char *, ...) : int
|
|
add (int, char **) : int
|
|
add (char **) : int
|
|
addRegexp (char *) : int
|
|
remove (char *) : int
|
|
remove (int, char *, ...) : int
|
|
remove (int, char **) : int
|
|
remove (char **) : int
|
|
removeRegexp (char *) : int
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 14>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF4">
|
|
Method Overview
|
|
of the Class
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF5">
|
|
cdevCollection
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
cdevCollection (char * name, cdevSystem & system);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This is the constructor for the cdevCollection class. It has the
|
|
following properties.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
This method is <em>protected</em> to prevent <em>cdevCollections</em> from
|
|
being instantiated directly. New <em>cdevCollection</em> instances
|
|
are created by using the <em>attachPtr</em> or <em>attachRef</em> method of
|
|
the <em>cdevCollection</em> class.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
The name that is provided to the <em>cdevCollection</em> is the
|
|
device name that CDEV will use to refer to it. The name
|
|
must be unique within the CDEV system of objects and
|
|
cannot be the same as the name of any regular <em>cdevDevice</em>
|
|
that exists in the CDEV DDL file.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
The <em>cdevSystem</em> reference that is provided is the
|
|
<em>cdevSystem</em> instance that will be used to <em>poll</em>, <em>pend</em> and
|
|
<em>flush</em> the <em>cdevCollection</em> object.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If the name provided is the name of a <em>cdevCollection</em> that
|
|
has been specified in the <em>CDEV DDL</em> file, then the list of
|
|
devices will be populated from the names that are
|
|
specified. Otherwise, an empty <em>cdevCollection</em> instance will
|
|
be created.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF6">
|
|
~cdevCollection
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
virtual ~cdevCollection (void);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This is the destructor for a cdevCollection object. It has the
|
|
following properties.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
This method is protected to prevent the <em>cdevCollection</em>
|
|
object from being destroyed by the application. This
|
|
method should only be called by the <em>cdevSystem</em> object
|
|
when the application is terminating.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
Because the <em>cdevCollection</em> object will normally be referred
|
|
to as a <em>cdevDevice</em> object, this destructor is virtual to
|
|
ensure that the <strong>'most senior'</strong> destructor is called first.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
This method will delete all device name strings that are
|
|
associated with the <em>cdevCollection</em> object.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF7">
|
|
getRequestObject
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
virtual int getRequestObject ( char *msg,
|
|
</p>
|
|
cdevRequestObject* &req);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method is called in order to obtain the cdevRequestObject
|
|
associated with the specified device/msg combination. This
|
|
method returns CDEV_SUCCESS if the cdevRequestObject
|
|
was successfully obtained. This method has the following
|
|
properties.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
The <em>cdevRequestObject</em> pointer that is returned is actually
|
|
a pointer to a <em>cdevCollectionRequest</em> object.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If a <em>cdevCollectionRequest</em> already exists for the specified
|
|
device/msg combination, it will be returned. Otherwise, the
|
|
method will call the <em>attachPtr</em> method of the
|
|
<em>cdevCollectionRequest</em> in order to obtain a new request
|
|
object.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF8">
|
|
attachRef/attachPtr
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
cdevCollection & attachRef (char * name);
|
|
</p>
|
|
cdevCollection & attachRef (char * name, cdevSystem & sys);
|
|
</p>
|
|
cdevCollection * attachPtr (char * name);
|
|
</p>
|
|
cdevCollection * attachPtr (char * name, cdevSystem &sys);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
These methods are used to obtain a pointer or reference to a
|
|
cdevCollection object. The name variable specifies the name of
|
|
the collection to be attached. These method have the following
|
|
properties.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
All functionality for these methods is stored in the <em>attachPtr
|
|
(char *, cdevSystem &)</em> method. All other methods will call
|
|
this one.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
The method will first determine if the device has already
|
|
been created. If it has been created and its <em>className</em>
|
|
method returns "<em>cdevCollection</em>", then the existing
|
|
<em>cdevCollection</em> will be returned. If a non-collection
|
|
<em>cdevDevice</em> of the same name has already been
|
|
constructed, then NULL will be returned.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If a device with the specified name has not already been
|
|
created, then the method will search the <em>cdevDirectory</em> for
|
|
the specified name. If the device name is in the
|
|
<em>cdevDirectory</em> AND is of class "<em>collection</em>", then a new
|
|
<em>cdevCollection</em> will be instantiated and returned. If a non-
|
|
collection <em>cdevDevice</em> of the same name exists in the
|
|
<em>cdevDirectory</em>, then NULL will be returned.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If a device with the specified name has not been
|
|
instantiated and does not exist in the <em>cdevDirectory</em>, then a
|
|
new, empty <em>cdevCollection</em> will be created with the
|
|
specified name.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If NULL is returned to one of the <em>attachRef</em> methods, then a
|
|
reference to a <em>cdevErrorCollection</em> object will be returned to
|
|
the caller.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
The <em>refCount</em> property of the <em>cdevCollection</em> will be
|
|
incremented each time a copy of the <em>cdevCollection</em> object
|
|
is obtained by the application.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF9">
|
|
detach
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int detach (cdevCollection & col);
|
|
</p>
|
|
int detach (cdevCollection * col);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method is called to detach a pointer or reference to a
|
|
cdevCollection object. It has the following properties.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
This method decrements the <em>refCount</em> property of the
|
|
<em>cdevCollection</em> object.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
When the <em>refCount</em> property is decremented to 0, then the
|
|
<em>cdevCollection</em> object will be deleted.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF10">
|
|
className
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
char * className (void);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method returns the name of the class; "<em>cdevCollection</em>". If
|
|
the developer inherits a service specific cdevCollection, then
|
|
this method should not be altered or overridden.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF11">
|
|
add
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int add (char *name);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method will add the individual name to the list of device
|
|
names that are in the cdevCollection. This method has the
|
|
following properties.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If a <em>cdevCollectionRequest</em> object has been instantiated for
|
|
this <em>cdevCollection</em> device, then the operation will fail and
|
|
<strong>CDEV_INVALIDOP</strong> will be returned.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If the name provided is NULL or empty, then the operation
|
|
will fail and <strong>CDEV_INVALIDOP</strong> will be returned.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If the name specified already exists in the collection of
|
|
names, then the operation will fail and <strong>CDEV_WARNING</strong>
|
|
will be returned.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If the name specified is not already in the list, then the
|
|
method will append the device name to the end of the list
|
|
and return <strong>CDEV_SUCCESS</strong>.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF12">
|
|
add
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int add (int num, char *firstname,...);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method will attempt to add a list of num names to the
|
|
cdevCollection. This method has the following properties.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If a <em>cdevCollectionRequest</em> object has been instantiated for
|
|
this <em>cdevCollection</em> device, then the operation will fail and
|
|
<strong>CDEV_INVALIDOP</strong> will be returned.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
This method will call the <em>add (char *name) </em>method for each
|
|
name that is specified.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If the add method fails to add any of the device name
|
|
strings to the list, then the error code that was generated by
|
|
the call to <em>add (char * name)</em> will be returned.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If an error occurs while adding a name to the list, the
|
|
method will continue with the next name until the last name
|
|
is reached.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If no errors occur while adding names to the list, then
|
|
<strong>CDEV_SUCCESS</strong> will be returned to the caller.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF13">
|
|
add
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int add (int num, char **names);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method will attempt to add <em>num</em> device names from the
|
|
<em>names</em> array to the list using the <em>add (char *name)</em> method of
|
|
the <em>cdevCollection</em>. This method has the same properties as
|
|
the <em>add (int num, char * firstname,...)</em> method.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF14">
|
|
add
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int add (char **names);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method will attempt to add each device name from the
|
|
NULL terminated <em>names</em> array to the list using the <em>add (char
|
|
*name)</em> method of the <em>cdevCollection</em>. This method has the
|
|
same properties as the <em>add (int num, char * firstname,...)</em>
|
|
method.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF15">
|
|
addRegexp
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int addRegexp (char *regexp);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method will query the system name server for the list of all
|
|
names in the <em>cdevDirectory</em> that match the specified regular
|
|
expression. the array of names will be added to the list using
|
|
the <em>add (int num, char ** names) </em>method and the result of this
|
|
operation will be returned.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF16">
|
|
remove
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int remove (char *name);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method will remove the specified device name from list of
|
|
device names that is stored in the <em>cdevCollection</em> object. This
|
|
method has the following properties.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If a <em>cdevCollectionRequest</em> object has been instantiated for
|
|
this <em>cdevCollection</em> device, then the operation will fail and
|
|
<strong>CDEV_INVALIDOP</strong> will be returned.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If the name provided is NULL or empty, then the operation
|
|
will fail and <strong>CDEV_WARNING</strong> will be returned.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If the name specified does not exist in the collection of
|
|
names, then the operation will fail and <strong>CDEV_WARNING</strong>
|
|
will be returned.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If the name specified exists in the list, then it will be
|
|
removed and <strong>CDEV_SUCCESS</strong> will be returned.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF17">
|
|
remove
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int remove (int num, char *name,...);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method will attempt to remove a list of num names from
|
|
the <em>cdevCollection</em>. This method has the following properties.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If a <em>cdevCollectionRequest</em> object has been instantiated for
|
|
this <em>cdevCollection</em> device, then the operation will fail and
|
|
<strong>CDEV_INVALIDOP</strong> will be returned.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
This method will call the <em>remove (char *name) </em>method for
|
|
each name that is specified.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If the remove method fails to remove any of the device
|
|
name strings from the list, then the error code that was
|
|
generated by the call to <em>remove (char * name)</em> will be
|
|
returned.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If an error occurs while removing a name from the list, the
|
|
method will continue with the next name until the last name
|
|
is reached.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If no errors occur while removing names from the list, then
|
|
<strong>CDEV_SUCCESS</strong> will be returned to the caller.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF18">
|
|
remove
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int remove (int num, char **names);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method will attempt to remove <em>num</em> device names as
|
|
specified in the <em>names</em> array from the list using the <em>remove
|
|
(char *name)</em> method of the <em>cdevCollection</em>. This method has
|
|
the same properties as the <em>remove (int num, char * name,...)</em>
|
|
method.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF19">
|
|
remove
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int remove (char **names);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method will attempt to remove each device name as
|
|
specified in the NULL terminated <em>names</em> array from the list
|
|
using the <em>remove (char *name)</em> method of the <em>cdevCollection</em>.
|
|
This method has the same properties as the <em>remove (int num,
|
|
char * name,...)</em> method.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF20">
|
|
removeRegexp
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int removeRegexp (char *regexp);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method will query the system name server for the list of all
|
|
names in the <em>cdevDirectory</em> that match the specified regular
|
|
expression. the array of names will be removed from the list
|
|
using the <em>remove (int num, char ** names) </em>method and the
|
|
result of this operation will be returned.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
2.
|
|
<!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
<a name="TOCREF21">
|
|
cdevCollectionRequest Class Design
|
|
</a> <!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF22">
|
|
Purpose of the
|
|
Class
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
The cdevCollectionRequest class is an abstract base class from which other
|
|
cdevCollectionRequest objects a re derived. It provides a protected constructor and
|
|
destructor that are used to initialize its internals, however, the primary mechanism that
|
|
is used to obtain a cdevCollectionRequest object is the <em>attachPtr</em> method.
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 3:
|
|
<a name="LOFREF3">
|
|
Object Inheritance Hierarchy of the cdevCollectionRequest Class
|
|
<AFrame 1>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF23">
|
|
Requirements of
|
|
the Class
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
This class will provide a mechanism for the caller to obtain a pointer to a
|
|
cdevCollectionRequest derived object that can be used as an interface to a
|
|
collection of devices.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The device/message combinations may fall into a variety of services.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The derived class will provide default support for the methods send, sendCallback
|
|
and sendNoBlock.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The send and sendNoBlock methods will rely on the sendCallback method to
|
|
transmit their request and receive a reply.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
Each data item that is returned by the individual devices must be scalar in nature.
|
|
Non-scalar results returned by a device will be discarded.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
If the scalar data that is returned by multiple devices is not homogeneous, the
|
|
data type will be promoted in such a way as to ensure that no data is lost.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
A special tagged data item, "resultCode" will be added to the cdevGlobalTagTable.
|
|
This data item will hold an ordered array of the completion codes that were
|
|
returned to the callback function in the <em>status</em> parameter.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 4:
|
|
<a name="LOFREF4">
|
|
Object Model of the cdevCollectionRequest Class
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
attributes:
|
|
RESULT_CODE_TAG: int
|
|
|
|
methods:
|
|
cdevCollectionRequest (char **, int, char *, cdevSystem &)
|
|
~cdevCollectionRequest (void) :{virtual}
|
|
|
|
attachPtr (...) :{static} cdevCollectionRequest
|
|
*
|
|
className (void) :{virtual} char *
|
|
resultCodeTag (void) :{virtual} int
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 6>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF24">
|
|
Method Overview
|
|
of the Class
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF25">
|
|
constructor
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
cdevCollectionRequest( char **devices, int nDevices,
|
|
</p>
|
|
char * msg, cdevSystem & system);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This is the constructor for the cdevCollectionRequest class. It
|
|
has the following properties.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
This method is <em>protected</em> to prevent the direct instantiation
|
|
of new <em>cdevCollectionRequests</em>. New instances of the
|
|
<em>cdevCollectionRequest objects are </em>created by using the
|
|
<em>attachPtr</em> or <em>attachRef</em> method of the <em>cdevRequestObject</em>
|
|
class which will call the local <em>attachPtr</em> method to create a
|
|
new object if necessary.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
The constructor is called by the cdevCollection object and
|
|
is provided with a list and count of devices that will be
|
|
included in the collection and the message that will be sent
|
|
to them.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
The <em>cdevSystem</em> reference that is provided is the
|
|
<em>cdevSystem</em> instance that will be used to <em>poll</em>, <em>pend</em> and
|
|
<em>flush</em> the <em>cdevCollectionRequest</em> object.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF26">
|
|
destructor
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
virtual ~cdevCollectionRequest (void);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This is the destructor for a cdevCollectionRequest object. It has
|
|
the following properties.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
This method is protected to prevent the
|
|
<em>cdevCollectionRequest</em> object from being destroyed by the
|
|
application. This method should only be called by the
|
|
<em>cdevSystem</em> object when the application is terminating.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
Because the <em>cdevCollectionRequest</em> object will normally be
|
|
referred to as a <em>cdevRequestObject</em> object, this destructor
|
|
is virtual to ensure that the <strong>'most senior'</strong> destructor is
|
|
called first.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF27">
|
|
attachPtr
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
cdevCollectionRequest * attachPtr
|
|
</p>
|
|
( cdevCollection &col, char *msg, cdevSystem &sys);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method is used by the cdevCollection object to obtain a
|
|
new cdevCollectionRequest object.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
This method will obtain a copy of the device names from
|
|
the cdevCollection object and will poll the cdevDirectory
|
|
object to determine which service each of them is
|
|
associated with.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If the devices are all from a single service, this method will
|
|
return a service specific collection request object.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If the devices are from a variety of services, this method will
|
|
return a cdevGrpCollectionRequest that contains the
|
|
service specific collection request objects.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
Device/message combinations that are not associated with
|
|
a service will be ignored.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_BULLETED ***!><font size=+1 color=Black>
|
|
If none of the device/message combinations can be
|
|
associated with a service, then an error message will be
|
|
generated and NULL will be returned.
|
|
<!*** Finish FUNC_BULLETED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF28">
|
|
className
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
char * className (void);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method returns the name of the class;
|
|
"<em>cdevCollectionRequest</em>". If the developer inherits a service
|
|
specific cdevCollectionRequest, then this method should not be
|
|
altered or overridden.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
3.
|
|
<!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
<a name="TOCREF29">
|
|
cdevGrpCollectionRequest Class Design
|
|
</a> <!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF30">
|
|
Purpose of the
|
|
Class
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
The cdevGrpCollectionRequest class is used when the list of devices will be serviced
|
|
by more than one cdevService. This class will create and maintain a list of service
|
|
specific cdevCollectionRequest objects and will compile the results into a single
|
|
cdevData object that will be returned to the caller.
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 5:
|
|
<a name="LOFREF5">
|
|
Object Inheritance Hierarchy of the cdevGrpCollectionRequest Class
|
|
<AFrame 18>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF31">
|
|
Requirements of
|
|
the Class
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
This class will break the list of devices into groups that will be associated with
|
|
individual services.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
A service-specific cdevCollectionRequest will be created and maintained for each
|
|
of the individual groups of devices.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The methods send, sendNoBlock and sendCallback will be provided to allow the
|
|
message to be transmitted to all of the embedded collections.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The send and sendNoBlock methods will utilize the sendCallback method to
|
|
transmit messages. This will reduce the amount of code that is required to
|
|
perform message transmission.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The class will collect all of the data from the service-specific collections into a
|
|
single cdevData object that will be provided to the user. The "<em>resultCode</em>" tag will
|
|
contain an array of completion codes that will indicate the completion status for
|
|
each device/message request.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The cdevGrpCollectionRequest object will maintain order information about the
|
|
individual devices that exist in the various service-specific collections. Resultant
|
|
data items will be placed in the correct order in the cdevData item that is returned
|
|
to the caller.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
If the data arrays that are returned by multiple collections are not homogeneous,
|
|
the data type will be promoted in such a way as to ensure that no data is lost.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
If a device does not have an associated cdev service, then its "<em>resultCode</em>" entry
|
|
will be set to CDEV_NOT_FOUND.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
If none of the devices can be associated with a service, then any call to send,
|
|
sendNoBlock or sendCallback will fail and will return CDEV_ERROR.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
If CDEV_ERROR is returned when the sendCallback method is used, then the
|
|
user defined callback function will not be called.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The send method will wait for a predefined period (5 seconds) for all of the service
|
|
specific collection objects to return their results. If one or more of the service
|
|
specific collections fails to respond within that period, then the send method will
|
|
fail and will return CDEV_ERROR.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
When using the sendCallback method, if one or more of the service specific
|
|
collections fails to respond, the user defined callback method will never be called.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
Calls to the getState and getAccess methods will poll each of the embedded
|
|
collections and will return an enumerated type that reflects the most restrictive
|
|
state that exists.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
Calls to the setContext method will result in the setContext method being called
|
|
for each of the embedded service-specific collections.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 6:
|
|
<a name="LOFREF6">
|
|
Object Model of the cdevGrpCollectionRequest Class
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
attributes:
|
|
sendStatus : struct SendStatus
|
|
sendCheckSum : int
|
|
collections : cdevCollectionRequest **
|
|
nCollections : int
|
|
requestOrder : int *
|
|
nRequests : int
|
|
format : cdevData
|
|
|
|
methods:
|
|
cdevGrpCollectionRequest (char **, int, char *, cdevSystem &)
|
|
~cdevGrpCollectionRequest (void) :{virtual}
|
|
|
|
getState (void) :{virtual} int
|
|
getAccess (void) :{virtual} int
|
|
setContext (cdevData &) :{virtual} int
|
|
send (cdevData &, cdevData &) :{virtual} int
|
|
send (cdevData &, cdevData *) :{virtual} int
|
|
send (cdevData *, cdevData &) :{virtual} int
|
|
send (cdevData *, cdevData *) :{virtual} int
|
|
sendNoBlock (cdevData &, cdevData &) :{virtual} int
|
|
sendNoBlock (cdevData &, cdevData *) :{virtual} int
|
|
sendNoBlock (cdevData *, cdevData &) :{virtual} int
|
|
sendNoBlock (cdevData *, cdevData *) :{virtual} int
|
|
sendCallback (cdevData &, cdevCallback &) :{virtual} int
|
|
sendCallback (cdevData *, cdevCallback &) :{virtual} int
|
|
className (void) :{virtual} char *
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 25>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF32">
|
|
Attribute
|
|
Overview of the
|
|
Class
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF33">
|
|
sendStatus
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
typedef struct {
|
|
</p>
|
|
int completionCode;
|
|
</p>
|
|
int finished;
|
|
</p>
|
|
cdevData *data;
|
|
</p>
|
|
} SendStatus sendStatus;
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This is a structure that is provided as the void * argument to the
|
|
callback function that is used for the <em>send</em> method. This
|
|
structure identifies the cdevData object that is to be populated
|
|
with the results and is also used to maintain a <em>completionCode</em>
|
|
and the <em>finished</em> semaphore.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF34">
|
|
sendCheckSum
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int sendCheckSum;
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
Because the send method uses the sendCallback method to
|
|
transmit its requests, a callback associated with an earlier
|
|
(timed-out) call to send may occur while the
|
|
cdevGrpCollectionRequest object is waiting. The
|
|
sendCheckSum is used by the callback method to ensure that
|
|
the correct request is being processed.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF35">
|
|
collections
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
cdevCollectionRequest * collections;
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This is an array of the service-specific collections. The first
|
|
entry in this list is a NULL collection that is used to identify all
|
|
devices that are not supported by a service.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF36">
|
|
nCollections
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int nCollections;
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This is the number of cdevCollectionRequests that have been
|
|
allocated to the collections array.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF37">
|
|
requestOrder
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int * requestOrder;
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This is an array of integers that corresponds to each device that
|
|
is in the cdevCollection. Each entry contains an integer that is
|
|
the index of the service-specific cdevCollectionRequest that is
|
|
associated with the individual device. This array is used to
|
|
place the data items from the various devices in the correct
|
|
order in the resultant cdevData item.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF38">
|
|
nRequests
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int nRequests;
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This is the number of entries in the requestOrder array (the
|
|
number of devices in the collection).
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF39">
|
|
format
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
cdevData format;
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This is a cdevData object that has the same internal structure
|
|
as the first data object retrieved from the
|
|
cdevGrpCollectionRequest. This cdevData object is used to
|
|
pre-format the user provided cdevData objects to the correct
|
|
data types in order to reduce the time expended in reformatting
|
|
the incoming data during type promotions.
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF40">
|
|
Method Overview
|
|
of the Class
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF41">
|
|
constructor
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
cdevGrpCollectionRequest
|
|
</p>
|
|
(char **devices, int nDevices, char *msg, cdevSystem& sys);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This is the constructor for the cdevGrpCollectionRequest
|
|
object. It will descend the list of devices that is provided and will
|
|
identify the cdev services that are associated with them. The
|
|
constructor will then create a service-specific
|
|
cdevCollectionRequest object for each group of devices.
|
|
</p>
|
|
Devices that are not associated with a service will be placed on
|
|
a 'dead' list and will automatically be marked with the
|
|
resultCode CDEV_NOT_FOUND whenever the send,
|
|
sendNoBlock or sendCallback methods are employed.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF42">
|
|
destructor
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
~cdevGrpCollectionRequest (void);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This is the destructor for the class. It will delete all of the
|
|
service-specific cdevCollectionRequests and will free any
|
|
memory that was previously allocated to the class.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF43">
|
|
getState
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int getState (void);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method calls the getState method of all of the service-
|
|
specific cdevCollectionRequest objects. The method will return
|
|
the most restrictive state that is encountered from any its
|
|
embedded collections.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF44">
|
|
getAccess
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int getAccess (void);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method calls the getAccess method of all of the service-
|
|
specific cdevCollectionRequest objects. The method will return
|
|
the most restrictive state that is encountered from any of its
|
|
embedded collections.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF45">
|
|
setContext
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int setContext (cdevData &ctx);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method will call the setContext method of all of the
|
|
service-specific cdevCollectionRequest objects. This method
|
|
will always return CDEV_SUCCESS.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF46">
|
|
send
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int send (cdevData & in, cdevData & out);
|
|
</p>
|
|
int send (cdevData * in, cdevData & out);
|
|
</p>
|
|
int send (cdevData & in, cdevData * out);
|
|
</p>
|
|
int send (cdevData * in, cdevData * out);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
The send methods are used to synchronously transmit a
|
|
message to all of the devices that are embedded within the
|
|
cdevGrpCollectionRequest object. The method will employ the
|
|
sendCallback method to transmit the message and then will
|
|
wait for a predefined period (5 seconds) for all of the collections
|
|
to respond. The method will display an error and return
|
|
CDEV_ERROR if the collections do not reply within the time
|
|
period.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF47">
|
|
sendNoBlock
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int sendNoBlock (cdevData & in, cdevData & out);
|
|
</p>
|
|
int sendNoBlock (cdevData * in, cdevData & out);
|
|
</p>
|
|
int sendNoBlock (cdevData & in, cdevData * out);
|
|
</p>
|
|
int sendNoBlock (cdevData * in, cdevData * out);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
The sendNoBlock methods are used to asynchronously send a
|
|
message to all of the devices that are embedded within the
|
|
cdevGrpCollectionRequest object. The method relies on the
|
|
sendCallback method to transmit the request. The caller must
|
|
have established a cdevGroup prior to submitting the message
|
|
in order to detect when all of the collections have responded.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF48">
|
|
sendCallback
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int sendCallback (cdevData & in, cdevCallback & callback);
|
|
</p>
|
|
int sendCallback (cdevData * in, cdevCallback & callback);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
The sendCallback methods are used to asynchronously
|
|
transmit a message to all of the devices that are embedded
|
|
within the cdevGrpCollectionRequest object. The user defined
|
|
callback method will be called when all of the service-specific
|
|
collections have responded.
|
|
</p>
|
|
If one or more of the service-specific collections fails to
|
|
respond, then the user specific callback will never be executed.
|
|
</p>
|
|
A copy is made of the callback object that is provided by the
|
|
user to ensure that it is not inadvertently deleted before the
|
|
callback function has been called.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF49">
|
|
className
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
const char *className (void) const;
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method will return the name of the class:
|
|
<em>"cdevGrpCollectionRequest".</em>
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
4.
|
|
<!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
<a name="TOCREF50">
|
|
cdevDefCollectionRequest Class Design
|
|
</a> <!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF51">
|
|
Purpose of the
|
|
Class
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
The cdevDefCollectionRequest object is the default collection request object for cdev.
|
|
If the service developer does not provide a service-specific collection mechanism,
|
|
then cdev will use this object to support collection request calls to the service.
|
|
</p>
|
|
This class performs collection operations by walking through the list of service-specific
|
|
request objects and executing them one at a time. The results from the individual
|
|
request objects will then be compiled into a single cdevData object that is returned to
|
|
the caller.
|
|
</p>
|
|
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 7:
|
|
<a name="LOFREF7">
|
|
Object Inheritance Hierarchy of the cdevDefCollectionRequest Class
|
|
<AFrame 27>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF52">
|
|
Requirements of
|
|
the Class
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
This class will obtain a service-specific cdevRequestObject for each device that is
|
|
specified.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The methods send, sendNoBlock and sendCallback will be provided to allow the
|
|
message to be transmitted to all of the embedded request objects.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The send and sendNoBlock methods will utilize the sendCallback method to
|
|
transmit messages. This will reduce the amount of code that is required to
|
|
perform message transmission.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The class will collect all of the data from the service-specific request objects into a
|
|
single cdevData object that will be provided to the user. The "<em>resultCode</em>" tag will
|
|
contain an array of completion codes that will indicate the completion status for
|
|
each device/message request.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The cdevDefCollectionRequest object will maintain order information about the
|
|
individual devices. Resultant data items will be placed in the correct order in the
|
|
cdevData item that is returned to the caller.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
If the data that is returned by the individual devices is not homogeneous, the data
|
|
type will be promoted in such a way as to ensure that no data is lost.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
If CDEV_ERROR is returned when the sendCallback method is used, then the
|
|
user defined callback function will not be called.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The send method will wait for a predefined period (5 seconds) for all of the request
|
|
objects to respond. If one or more of the request objects fails to respond within
|
|
that period, then the send method will fail and will return CDEV_ERROR.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
When using the sendCallback method, if one or more of the request objects fails
|
|
to respond, the user defined callback method will never be called.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
Calls to the getState and getAccess methods will poll each of the embedded
|
|
request objects and will return an enumerated type that reflects the most
|
|
restrictive state that exists.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
Calls to the setContext method will result in the setContext method being called
|
|
for each of the embedded request objects.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 8:
|
|
<a name="LOFREF8">
|
|
Object Model of the cdevDefCollectionRequest Class
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
attributes:
|
|
sendStatus : struct SendStatus
|
|
sendCheckSum : int
|
|
requests : cdevRequestObject **
|
|
nRequests : int
|
|
format : cdevData
|
|
|
|
methods:
|
|
cdevDefCollectionRequest (char **, int, char *, cdevSystem &)
|
|
~cdevDefCollectionRequest (void) :{virtual}
|
|
|
|
getState (void) :{virtual} int
|
|
getAccess (void) :{virtual} int
|
|
setContext (cdevData &) :{virtual} int
|
|
send (cdevData &, cdevData &) :{virtual} int
|
|
send (cdevData &, cdevData *) :{virtual} int
|
|
send (cdevData *, cdevData &) :{virtual} int
|
|
send (cdevData *, cdevData *) :{virtual} int
|
|
sendNoBlock (cdevData &, cdevData &) :{virtual} int
|
|
sendNoBlock (cdevData &, cdevData *) :{virtual} int
|
|
sendNoBlock (cdevData *, cdevData &) :{virtual} int
|
|
sendNoBlock (cdevData *, cdevData *) :{virtual} int
|
|
sendCallback (cdevData &, cdevCallback &) :{virtual} int
|
|
sendCallback (cdevData *, cdevCallback &) :{virtual} int
|
|
className (void) :{virtual} char *
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 34>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF53">
|
|
Attribute
|
|
Overview of the
|
|
Class
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF54">
|
|
sendStatus
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
typedef struct {
|
|
</p>
|
|
int completionCode;
|
|
</p>
|
|
int finished;
|
|
</p>
|
|
cdevData *data;
|
|
</p>
|
|
} SendStatus sendStatus;
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This is a structure that is provided as the void * argument to the
|
|
callback function that is used for the <em>send</em> method. This
|
|
structure identifies the cdevData object that is to be populated
|
|
with the results and is also used to maintain a <em>completionCode</em>
|
|
and the <em>finished</em> semaphore.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF55">
|
|
sendCheckSum
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int sendCheckSum;
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
Because the send method uses the sendCallback method to
|
|
transmit its requests, a callback associated with an earlier
|
|
(timed-out) call to send may occur while the
|
|
cdevDefCollectionRequest object is waiting. The
|
|
sendCheckSum is used by the callback method to ensure that
|
|
the correct request is being processed.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF56">
|
|
requests
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
cdevRequestObject ** requests;
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This is an array of request objects that are associated with
|
|
each of the devices in the collection.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF57">
|
|
nRequests
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int nRequests;
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This is the number of request objects in the requests array (the
|
|
number of devices in the collection).
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF58">
|
|
format
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
cdevData format;
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This is a cdevData object that has the same internal structure
|
|
as the first data object generated by the
|
|
cdevDefCollectionRequest. This cdevData object is used to
|
|
pre-format the user provided cdevData objects to the correct
|
|
data types in order to reduce the time expended in reformatting
|
|
the incoming data during type promotions.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF59">
|
|
Method Overview
|
|
of the Class
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF60">
|
|
constructor
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
cdevDefCollectionRequest
|
|
</p>
|
|
(char **devices, int nDevices, char *msg, cdevSystem& sys);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This is the constructor for the cdevDefCollectionRequest
|
|
object. It will descend the list of devices that is provided and will
|
|
connect to the cdevRequestObject associated with each
|
|
device.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF61">
|
|
destructor
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
~cdevDefCollectionRequest (void);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This is the destructor for the class. It will free any memory that
|
|
was previously allocated to the class.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF62">
|
|
getState
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int getState (void);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method calls the getState method of all of the embedded
|
|
request objects. The method will return the most restrictive
|
|
state that is encountered.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF63">
|
|
getAccess
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int getAccess (void);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method calls the getAccess method of all of the embedded
|
|
request objects. The method will return the most restrictive
|
|
state that is encountered.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF64">
|
|
setContext
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int setContext (cdevData &ctx);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method will call the setContext method of all of the
|
|
embedded request objects. This method will always return
|
|
CDEV_SUCCESS.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF65">
|
|
send
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int send (cdevData & in, cdevData & out);
|
|
</p>
|
|
int send (cdevData * in, cdevData & out);
|
|
</p>
|
|
int send (cdevData & in, cdevData * out);
|
|
</p>
|
|
int send (cdevData * in, cdevData * out);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
The send methods are used to synchronously transmit a
|
|
message to all of the devices that are embedded within the
|
|
cdevDefCollectionRequest object. The method will employ the
|
|
sendCallback method to transmit the message and then will
|
|
wait for a predefined period (5 seconds) for all of the request
|
|
objects to respond. The method will display an error and return
|
|
CDEV_ERROR if the request objects do not reply within the
|
|
time period.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF66">
|
|
sendNoBlock
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int sendNoBlock (cdevData & in, cdevData & out);
|
|
</p>
|
|
int sendNoBlock (cdevData * in, cdevData & out);
|
|
</p>
|
|
int sendNoBlock (cdevData & in, cdevData * out);
|
|
</p>
|
|
int sendNoBlock (cdevData * in, cdevData * out);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
The sendNoBlock methods are used to asynchronously send a
|
|
message to all of the devices that are embedded within the
|
|
cdevDefCollectionRequest object. The method relies on the
|
|
sendCallback method to transmit the request. The caller must
|
|
have established a cdevGroup prior to submitting the message
|
|
in order to detect when all of the request objects have
|
|
responded.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF67">
|
|
sendCallback
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
int sendCallback (cdevData & in, cdevCallback & callback);
|
|
</p>
|
|
int sendCallback (cdevData * in, cdevCallback & callback);
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
The sendCallback methods are used to asynchronously
|
|
transmit a message to all of the devices that are embedded
|
|
within the cdevDefCollectionRequest object. The user defined
|
|
callback method will be called when all of the request objects
|
|
have responded.
|
|
</p>
|
|
If one or more of the request objects fails to respond, then the
|
|
user specific callback will never be executed.
|
|
</p>
|
|
A copy is made of the callback object that is provided by the
|
|
user to ensure that it is not inadvertently deleted before the
|
|
callback function has been called.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF68">
|
|
className
|
|
</a> <!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
const char *className (void) const;
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This method will return the name of the class:
|
|
<em>"cdevDefCollectionRequest".</em>
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
5.
|
|
<!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
<a name="TOCREF69">
|
|
Defining cdevCollections in the CDEV DDL File
|
|
</a> <!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF70">
|
|
Overview
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
A cdevCollection device can be implemented in one of two ways; the developer can
|
|
create an empty cdevCollection dynamically and add devices to it, or a collection entry
|
|
can be placed in the CDEV DDL file that identifies the collection and its constituent
|
|
devices. The syntax for defining a cdevCollection device in the CDEV DDL file is as
|
|
follows.
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 9:
|
|
<a name="LOFREF9">
|
|
cdevCollection Definition in the CDEV DDL File
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
/* service definitions */
|
|
...
|
|
|
|
/* class definitions */
|
|
...
|
|
|
|
/* device instances */
|
|
...
|
|
|
|
/* alias definitions */
|
|
...
|
|
|
|
collection cDevice1 :
|
|
device0,
|
|
device1,
|
|
device2
|
|
;
|
|
|
|
collection cDevice2 :
|
|
device3
|
|
device4
|
|
device5
|
|
;
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 36>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
|
|
</p>
|
|
In the example above two cdevCollections are defined. A cdevCollection definition is
|
|
started by using the keyword "<strong><em>collection</strong></em>", followed by a space and then the name of
|
|
the collection. Note that the name of the collection must be unique and cannot be
|
|
shared with any other device in the cdev system.
|
|
</p>
|
|
The device name is followed by a white space character (<strong><em>which is required</strong></em>), and
|
|
then a colon, followed by another white space character and then the list of devices.
|
|
The device names that are in the list may be separated by either white space of a
|
|
<strong><em>comma</strong></em> delimiter. The list of devices is terminated by a <strong><em>semicolon</strong></em>.
|
|
</p>
|
|
The current implementation of the CDEV DDL is order dependent. Because of this,
|
|
the developer should place the collection definitions after the definitions of all devices
|
|
and aliases.
|
|
<!*** Finish BODY ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
6.
|
|
<!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
<a name="TOCREF71">
|
|
Elementary Commands of the cdevCollection
|
|
</a> <!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF72">
|
|
Attaching to a
|
|
cdevCollection
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
In order to use a cdevCollection, the developer must first use the attachRef or
|
|
attachPtr method to obtain a pointer to the device. If the device name that is provided
|
|
to the method is the name of a predefined collection device that exists in the CDEV
|
|
DDL file, then it will be populated with the devices that are specified in the device list.
|
|
If the device name is NOT specified in the CDEV DDL file, then a warning will be
|
|
displayed and an empty cdevCollection will be created.
|
|
</p>
|
|
The code below illustrates how to obtain a reference to a cdevCollection using the
|
|
attachRef method, and how to obtain a pointer to a cdevCollection using the attachPtr
|
|
method. In the example, the "brandNew" cdevCollection will be created with no
|
|
constituent devices because it is not defined in the CDEV DDL file. The "cDevice1"
|
|
collection will be populated with the devices: "device0", "device1", and "device2" as
|
|
defined in the CDEV DDL file.
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 10:
|
|
<a name="LOFREF10">
|
|
Attach to a cdevCollection using attachPtr and attachRef
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
#include <cdevCollection.h>
|
|
|
|
void main ( void )
|
|
{
|
|
/***************************************************************
|
|
* Obtain a reference to a cdevCollection device named
|
|
* "brandNew". Because this collection is not defined in the
|
|
* CDEV DDL file, it will be created with no constituent
|
|
* devices.
|
|
|
|
***************************************************************/
|
|
cdevCollection & brandNew =
|
|
cdevCollection::attachRef("brandNew");
|
|
|
|
/***************************************************************
|
|
* Obtain a reference to a cdevCollection device named
|
|
* "cDevice1". This collection is defined in the CDEV DDL file
|
|
* and will be populated with the devices: "device0", "device1",
|
|
* and "device2".
|
|
|
|
***************************************************************/
|
|
cdevCollection * cDevice1 =
|
|
cdevCollection::attachPtr("cDevice1");
|
|
}
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 38>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF73">
|
|
Detaching from a
|
|
cdevCollection
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
Because only one copy of each cdevDevice or cdevCollection exists in the
|
|
cdevSystem, the number of references to a device that are in use is tracked using a
|
|
reference count variable. The detach method decrements that reference count. When
|
|
the reference count reaches 0, the cdevSystem may delete the device.
|
|
</p>
|
|
The following illustration shows how to detach from a cdevCollection.
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 11:
|
|
<a name="LOFREF11">
|
|
Detach from a cdevCollection using detach
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
#include <cdevCollection.h>
|
|
|
|
void main ( void )
|
|
{
|
|
cdevCollection & cDevice1 =
|
|
cdevCollection::attachRef("cDevice1");
|
|
cdevCollection::detach(cDevice1);
|
|
}
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 40>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF74">
|
|
Adding Devices to
|
|
a cdevCollection
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
When creating an empty cdevCollection device, the developer will have to add the
|
|
constituent devices to the collection using one of the variations of the "add" method.
|
|
These methods will allow the developer to add either individual devices, lists of
|
|
devices, or devices from the CDEV DDL file that match a specific regular expression.
|
|
</p>
|
|
It should be noted by the developer that only cdevDevices may be added to a
|
|
cdevCollection. The current design of the cdevCollection device does not support
|
|
adding collections to a collection.
|
|
</p>
|
|
The variations of the add method are described in the following sections.
|
|
<!*** Finish BODY ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF75">
|
|
Adding a Single
|
|
Device to a
|
|
cdevCollection
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
When adding a single device to a collection, the <em>add (char * name)</em> method should be
|
|
employed. This method will add the specified device name to the list of device names
|
|
(if any) that already exists in the cdevCollection. The following source code illustrates
|
|
how to add the cdevDevice "device0" to the cdevCollection "brandNew".
|
|
</p>
|
|
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 12:
|
|
<a name="LOFREF12">
|
|
Adding a single device to a cdevCollection
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
#include <cdevCollection.h>
|
|
void main ( void )
|
|
{
|
|
/**************************************************************
|
|
* Attach to an undefined cdevCollection device and then add
|
|
* the cdevDevice "device0" to it.
|
|
**************************************************************/
|
|
cdevCollection & brandNew =
|
|
cdevCollection::attachRef("brandNew");
|
|
brandNew.add("device0");
|
|
}
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 44>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF76">
|
|
Adding Multiple
|
|
Devices to a
|
|
cdevCollection
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
There are several variations of the add method that will allow you to add several
|
|
devices to a cdevCollection using a single method. This method uses a variable length
|
|
argument list to allow the caller to pass in an arbitrary number of device names as
|
|
parameters to the call.
|
|
</p>
|
|
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 13:
|
|
<a name="LOFREF13">
|
|
Adding multiple devices to a cdevCollection
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
#include <cdevCollection.h>
|
|
|
|
void main ( void )
|
|
{
|
|
/**************************************************************
|
|
* Attach to the cdevCollection "brandNew" and add four device
|
|
* names to it.
|
|
**************************************************************/
|
|
cdevCollection & brandNew =
|
|
cdevCollection::attachRef("brandNew");
|
|
brandNew.add(4, "device0", "device1", "device2", "device3");
|
|
}
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 42>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF77">
|
|
Adding an Array of
|
|
Devices to a
|
|
cdevCollection
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
This add method allows the developer to add an array of device names to the
|
|
cdevCollection. In this variation of the add method, the caller must specify the number
|
|
of device names that are stored in the array.
|
|
</p>
|
|
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 14:
|
|
<a name="LOFREF14">
|
|
Adding an array of devices to a cdevCollection
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
#include <cdevCollection.h>
|
|
|
|
char * devices[] = {"device0", "device1", "device2", "device3"};
|
|
|
|
void main ( void )
|
|
{
|
|
/**************************************************************
|
|
* Attach to the cdevCollection "brandNew" and add four device
|
|
* names to it.
|
|
**************************************************************/
|
|
cdevCollection & brandNew =
|
|
cdevCollection::attachRef("brandNew");
|
|
brandNew.add(4, devices);
|
|
}
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 48>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF78">
|
|
Adding a NULL-
|
|
Terminated Array
|
|
of Devices to a
|
|
cdevCollection
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
This add method allows the developer to add an array of device names to the
|
|
cdevCollection. In this variation of the add method, the last character string pointer in
|
|
the array must be NULL.
|
|
</p>
|
|
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 15:
|
|
<a name="LOFREF15">
|
|
Adding a NULL-terminated array of devices to a cdevCollection
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
#include <cdevCollection.h>
|
|
|
|
char * devices[] = {"device0", "device1", "device2", NULL};
|
|
|
|
void main ( void )
|
|
{
|
|
/**************************************************************
|
|
* Attach to the cdevCollection "brandNew" and add a NULL
|
|
* terminated list of devices to it.
|
|
**************************************************************/
|
|
cdevCollection & brandNew =
|
|
cdevCollection::attachRef("brandNew");
|
|
brandNew.add(devices);
|
|
}
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 46>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF79">
|
|
Adding Devices to
|
|
a cdevCollection
|
|
Using Regular
|
|
Expressions
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
The addRegexp method uses the regular expression parsing interface of the
|
|
cdevDirectory device to obtain the names of all of the devices that match the specified
|
|
expression. This list of names will then be added to the cdevCollection device. The
|
|
regular expression may be in either standard format or the format used for UNIX
|
|
filename expansion. See the cdevDirectory documentation for more information on
|
|
regular expressions.
|
|
</p>
|
|
The following code illustrates loading all devices that match the expression "<em>device?</em>".
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 16:
|
|
<a name="LOFREF16">
|
|
Adding a device to a cdevCollection using regular expressions
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
#include <cdevCollection.h>
|
|
|
|
void main ( void )
|
|
{
|
|
/**************************************************************
|
|
* Attach to the cdevCollection "brandNew" and add a NULL
|
|
* terminated list of devices to it.
|
|
**************************************************************/
|
|
cdevCollection & brandNew =
|
|
cdevCollection::attachRef("brandNew");
|
|
brandNew.addRegexp("device?");
|
|
}
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 52>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF80">
|
|
Removing a
|
|
Single Device from
|
|
a cdevCollection
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
When removing a single device from a collection, the <em>remove (char * name)</em> method
|
|
should be employed. This method will remove the specified device name from the list
|
|
of device names (if any) that already exists in the cdevCollection. The following source
|
|
code illustrates how to remove the cdevDevice "device0" from the cdevCollection
|
|
"cDevice1".
|
|
</p>
|
|
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 17:
|
|
<a name="LOFREF17">
|
|
Removing a single device from a cdevCollection
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
#include <cdevCollection.h>
|
|
|
|
void main ( void )
|
|
{
|
|
/**************************************************************
|
|
* Attach to a defined cdevCollection device and then remove
|
|
* the cdevDevice "device0" from it.
|
|
**************************************************************/
|
|
cdevCollection & cDevice1 =
|
|
cdevCollection::attachRef("cDevice1");
|
|
cDevice1.remove("device0");
|
|
}
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 50>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF81">
|
|
Removing
|
|
Multiple Devices
|
|
from a
|
|
cdevCollection
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
There are several variations of the remove method that will allow you to remove
|
|
several devices from a cdevCollection using a single function call. This method uses a
|
|
variable length argument list to allow the caller to pass in an arbitrary number of
|
|
device names as parameters to the call.
|
|
</p>
|
|
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 18:
|
|
<a name="LOFREF18">
|
|
Removing multiple devices from a cdevCollection
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
#include <cdevCollection.h>
|
|
|
|
void main ( void )
|
|
{
|
|
/**************************************************************
|
|
* Attach to a defined cdevCollection device and then remove
|
|
* two cdevDevices from it.
|
|
**************************************************************/
|
|
cdevCollection & cDevice1 =
|
|
cdevCollection::attachRef("cDevice1");
|
|
cDevice1.remove(2, "device0", "device2");
|
|
}
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 54>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF82">
|
|
Removing an
|
|
Array of Devices
|
|
from a
|
|
cdevCollection
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
This remove method allows the developer to remove an array of device names from
|
|
the cdevCollection. In this variation of the remove method, the caller must specify the
|
|
number of device names that are stored in the array.
|
|
</p>
|
|
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 19:
|
|
<a name="LOFREF19">
|
|
Removing an array of devices from a cdevCollection
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
#include <cdevCollection.h>
|
|
|
|
char * devices[] = {"device0", "device2"};
|
|
|
|
void main ( void )
|
|
{
|
|
/**************************************************************
|
|
* Attach to a defined cdevCollection device and then remove
|
|
* two cdevDevices from it.
|
|
**************************************************************/
|
|
cdevCollection & cDevice1 =
|
|
cdevCollection::attachRef("cDevice1");
|
|
cDevice1.remove(2, devices);
|
|
}
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 56>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF83">
|
|
Removing a NULL-
|
|
Terminated Array
|
|
of Devices from a
|
|
cdevCollection
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
This remove method allows the developer to remove an array of device names from
|
|
the cdevCollection. In this variation of the remove method, the last character string
|
|
pointer in the array must be NULL.
|
|
</p>
|
|
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 20:
|
|
<a name="LOFREF20">
|
|
Removing a NULL-terminated array of devices from a cdevCollection
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
#include <cdevCollection.h>
|
|
|
|
char * devices[] = {"device0", "device2", NULL};
|
|
|
|
void main ( void )
|
|
{
|
|
/**************************************************************
|
|
* Attach to a defined cdevCollection device and then remove
|
|
* a NULL terminated list of devices from it.
|
|
**************************************************************/
|
|
cdevCollection & cDevice1 =
|
|
cdevCollection::attachRef("cDevice1");
|
|
cDevice1.remove(devices);
|
|
}
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 58>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF84">
|
|
Removing
|
|
Devices from a
|
|
cdevCollection
|
|
Using Regular
|
|
Expressions
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
The removeRegexp method uses the regular expression parsing interface of the
|
|
cdevDirectory device to obtain the names of all of the devices that match the specified
|
|
expression. This list of names will then be removed from the cdevCollection device.
|
|
The regular expression may be in either standard format or the format used for UNIX
|
|
filename expansion. See the cdevDirectory documentation for more information on
|
|
regular expressions.
|
|
</p>
|
|
The following code illustrates removing all devices that match the expression
|
|
"<em>device?</em>" from the cdevCollection "<em>cDevice1</em>".
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 21:
|
|
<a name="LOFREF21">
|
|
Removing devices from a cdevCollection using regular expressions
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
#include <cdevCollection.h>
|
|
|
|
void main ( void )
|
|
{
|
|
/**************************************************************
|
|
* Attach to a defined cdevCollection device and then remove
|
|
* all devices that match the specified regular expression.
|
|
**************************************************************/
|
|
cdevCollection & cDevice1 =
|
|
cdevCollection::attachRef("cDevice1");
|
|
cDevice1.removeRegexp("device?");
|
|
}
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 60>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF85">
|
|
Getting a List of
|
|
Devices from a
|
|
cdevCollection
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
In some cases the developer may want to obtain a list of devices that constitute a
|
|
cdevCollection. This can be done by using the getList method. This method will obtain
|
|
a NULL terminated list of devices that currently comprise the cdevCollection. The
|
|
developer is responsible for deleting the character string array that is returned by this
|
|
method, however, one should not delete the individual character strings that are
|
|
stored in the array.
|
|
</p>
|
|
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 22:
|
|
<a name="LOFREF22">
|
|
Getting a list of devices from a cdevCollection
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
#include <cdevCollection.h>
|
|
|
|
void main ( void )
|
|
{
|
|
/**************************************************************
|
|
* Attach to a cdevCollection device and then use the getList
|
|
* method to obtain the array of names that are currently
|
|
* stored in the cdevCollection and display them.
|
|
*
|
|
* Note that the list (not the list items) must be deleted by
|
|
* the caller.
|
|
**************************************************************/
|
|
cdevCollection & cDevice1 =
|
|
cdevCollection::attachRef("cDevice1");
|
|
|
|
char ** list = cDevice1.getList();
|
|
for(char **s = list; *s!=NULL; s++) printf("%s\\n", *s);
|
|
delete list;
|
|
}
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 62>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
7.
|
|
<!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
<a name="TOCREF86">
|
|
Restrictions of the cdevCollection Device
|
|
</a> <!*** Finish HEADING1 ***!></p></strong></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
1.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
Device names can only be added to or removed from the cdevCollection device
|
|
until it has been used <strong><em>once</strong></em>. After a cdevCollectionRequest object has been
|
|
generated from a specific cdevCollection device, the device list cannot be
|
|
modified.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
2.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
cdevCollection devices do not support the messages "monitorOn" and
|
|
"monitorOff". Only monotonic operations are currently supported by the
|
|
cdevCollection device.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
3.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
cdevCollection definitions must be the last things defined in the CDEV DDL file.
|
|
This is because the constituent devices must have already been defined when the
|
|
cdevCollection is defined.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
4.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
When the data from a cdevDevice operation is used to construct the output
|
|
cdevData object for a cdevCollection operation, only data that is scalar in nature
|
|
will be used. If a cdevDevice returns tagged data items that are arrays in its
|
|
results, those data items will not be included in the result.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
5.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
cdevCollection objects must be comprised of regular cdevDevice objects only.
|
|
Because the cdevCollection does not support cdevDevices that return arrays of
|
|
data in their result, a cdevCollection can not contain another cdevCollection.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
6.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
If a cdevCollection consists of devices from multiple services, the collection does
|
|
not guarantee the order in which the cdevDevice's requests will be serviced.
|
|
Because services perform at varying speeds, a faster service may process its
|
|
devices requests sooner than another service.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
</table>
|
|
</body>
|