CPLStation.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. <chapter id='CPLStation'>
  2. <title>
  3. Class CPLStation
  4. </title>
  5. <section id="CPLStation-class">
  6. <title>
  7. Introduction
  8. </title>
  9. <para>
  10. This class implements a single station on a HomePlug AV powerline network. Class instances are instantiated and initialized only by instantiating the <link linkend='CPLNetwork'>CPLNetwork</link> class. Class properties are read-only and class methods are passive.
  11. </para>
  12. <para>
  13. The <citetitle>Firmware Technical Reference Manaual</citetitle> uses terminology that views a powerline network from the <quote>inside-looking-out</quote>. This class uses terminology that views a powerline network from the <quote>outside-looking-in</quote>. For example, here, a <quote>device</quote> is something connected to a powerline <quote>station</quote>, a <quote>network</quote> is a collection of <quote>stations</quote> and every <quote>adapter</quote> is a <quote>station</quote>.
  14. </para>
  15. <para>
  16. This class is declared in <ulink url='CPLStation.hpp.html'>CPLStation.hpp</ulink> and defined in <ulink url='CPLStation.cpp.html'>CPLStation.cpp</ulink>.
  17. </para>
  18. <section id="CPLStation-inheritance">
  19. <title>
  20. Inheritance
  21. </title>
  22. <para>
  23. None.
  24. </para>
  25. </section>
  26. <section id="CPLStation-dependence">
  27. <title>
  28. Dependence
  29. </title>
  30. <para>
  31. This class depends on the <link linkend='CPLNetwork'>CPLNetwork</link> class to instantiate it and inialize all properties. There is no need for an application programs to instantiate this class directly.
  32. </para>
  33. <para>
  34. This class uses class <link linkend='ointellon'>ointellon</link> to encode and decode vendor specific management message frames.
  35. </para>
  36. <para>
  37. This class uses static class <link linkend='omemory'>omemory</link> to print outgoing and incoming frames.
  38. </para>
  39. <para>
  40. This class uses static class <link linkend='oerror'>oerror</link> to report errors.
  41. </para>
  42. </section>
  43. </section>
  44. <section id="CPLStation-properties">
  45. <title>
  46. Properties
  47. </title>
  48. <para>
  49. This class inherits no properties. Class properties are all read-only and cannot be modified once initialized.
  50. </para>
  51. <section id="CPLStation-HardwareType">
  52. <title>
  53. CPLStation::HardwareType
  54. </title>
  55. <funcsynopsis>
  56. <funcprototype>
  57. <funcdef>unsigned <function>HardwareType</function></funcdef>
  58. <paramdef>void</paramdef>
  59. </funcprototype>
  60. </funcsynopsis>
  61. <para>
  62. Return the hardware type as an unsigned integer. The hardware type incidates the chipset architecture. The value <constant>0</constant> means an unknown chipset architecture. A value greater than <constant>0</constant> indicates an <productname>INT6000</productname>, <productname>INT6300</productname>, <productname>INT6400</productname> and so on. The hardware type is the same as the <varname>MDEVICEID</varname> field of the <varname>VS_SW_VER</varname> management message described in the <citetitle>Firmware Technical Reference Manual</citetitle>.
  63. </para>
  64. </section>
  65. <section id="CPLStation-HardwareName">
  66. <title>
  67. CPLStation::HardwareName
  68. </title>
  69. <funcsynopsis>
  70. <funcprototype>
  71. <funcdef>char const * <function>HardwareName</function></funcdef>
  72. <paramdef>void</paramdef>
  73. </funcprototype>
  74. </funcsynopsis>
  75. <para>
  76. Return the hardware name as a <constant>NUL</constant> terminated character string. The hardware name is based on the <link linkend='CPLStation-HardwareType'>HardwareType</link>. The string <constant>"UNSUPPORTED"</constant> means the chipset is not recognized. Normally, the string will be one of <constant>"INT6000"</constant>, <constant>"INT6300"</constant> or <constant>"INT6400"</constant>.
  77. </para>
  78. </section>
  79. <section id="CPLStation-FirmwareName">
  80. <title>
  81. CPLStation::FirmwareName
  82. </title>
  83. <funcsynopsis>
  84. <funcprototype>
  85. <funcdef>char const * <function>FirmwareName</function></funcdef>
  86. <paramdef>void</paramdef>
  87. </funcprototype>
  88. </funcsynopsis>
  89. <para>
  90. Return the fimware revision as a <constant>NUL</constant> terminated character string. An example string might look like <constant>"INT6000-MAC-4-0-4011-01-3431-20090519-FINAL-B"</constant>. The firmware revision is the same as the <varname>MVERSION</varname> field of the <varname>VS_SW_VER</varname> management message described in the <citetitle>Firmware Technical Reference Manual</citetitle>.
  91. </para>
  92. </section>
  93. <section id="CPLStation-HostAddress">
  94. <title>
  95. CPLStation::HostAddress
  96. </title>
  97. <funcsynopsis>
  98. <funcprototype>
  99. <funcdef> byte const * <function>HostAddress</function></funcdef>
  100. <paramdef>void</paramdef>
  101. </funcprototype>
  102. </funcsynopsis>
  103. <para>
  104. Return the first bridged device hardware address. This is the hardware address of the first Ethernet device being supported by the powerline station. The bridged device address is <constant>ETHER_ADDR_LEN</constant> bytes. The host address is the same as the <acronym>BDA</acronym> returned by the <varname>VS_NW_INFO</varname> management message described in the <citetitle>Firwmare Technical Reference Manual</citetitle>.
  105. </para>
  106. <para>
  107. If the host address is the <link linkend='oethernet-BroadcastAddress'>BroadcastAddress</link> then no Ethernet devices are connected to the station. This is a common condition that does not affect the reliability of the other property values.
  108. </para>
  109. </section>
  110. <section id="CPLStation-HostAddressString">
  111. <title>
  112. CPLStation::HostAddressString
  113. </title>
  114. <funcsynopsis>
  115. <funcprototype>
  116. <funcdef>char const * <function>HostAddressString</function></funcdef>
  117. <paramdef>void</paramdef>
  118. </funcprototype>
  119. </funcsynopsis>
  120. <para>
  121. Return the <link linkend='CPLStation-HostAddress'>HostAddress</link> property as a <constant>NUL</constant> terminated hexadecimal character string. The string is <constant>ETHER_ADDR_LEN</constant>*<constant>3</constant> characters long including the terminator.
  122. </para>
  123. </section>
  124. <section id="CPLStation-IsBridge">
  125. <title>
  126. CPLStation::IsBridge
  127. </title>
  128. <funcsynopsis>
  129. <funcprototype>
  130. <funcdef>bool <function>IsBridge</function></funcdef>
  131. <paramdef>void</paramdef>
  132. </funcprototype>
  133. </funcsynopsis>
  134. <para>
  135. Return logical <constant>true</constant> if this station is a host bridge. This property is a boolean alternative to the <link linkend='CPLStation-LinkType'>LinkType</link> property.
  136. </para>
  137. </section>
  138. <section id="CPLStation-LinkName">
  139. <title>
  140. CPLStation::LinkName
  141. </title>
  142. <funcsynopsis>
  143. <funcprototype>
  144. <funcdef>unsigned <function>LinkName</function></funcdef>
  145. <paramdef>void</paramdef>
  146. </funcprototype>
  147. </funcsynopsis>
  148. <para>
  149. Return the relationship between the station and this host as a <constant>NUL</constant> terminated character string. The string <constant>"LOC"</constant> means the station is local and serves as the ethernet-to-powerline bridge for this host. The string <constant>"REM"</constant> means the station is remote as serves as the powerline-to-ethernet bridge for another host. These string are useful when enumerating powerline network devices.
  150. </para>
  151. </section>
  152. <section id="CPLStation-LinkType">
  153. <title>
  154. CPLStation::LinkType
  155. </title>
  156. <funcsynopsis>
  157. <funcprototype>
  158. <funcdef>unsigned <function>LinkType</function></funcdef>
  159. <paramdef>void</paramdef>
  160. </funcprototype>
  161. </funcsynopsis>
  162. <para>
  163. Return the relationship between the station and this host as an unsigned integer. The value <constant>0</constant> means the station is local and serves as the ethernet-to-powerline bridge for this host. The value <constant>1</constant> means the station is remote and serves as the powerline-to-ethernet bridge for another host.
  164. </para>
  165. </section>
  166. <section id="CPLStation-NodeAddress">
  167. <title>
  168. CPLStation::NodeAddress
  169. </title>
  170. <funcsynopsis>
  171. <funcprototype>
  172. <funcdef> byte const * <function>NodeAddress</function></funcdef>
  173. <paramdef>void</paramdef>
  174. </funcprototype>
  175. </funcsynopsis>
  176. <para>
  177. Return the station hardware address. This is the address of the powerline station, itself. The station address is <constant>ETHER_ADDR_LEN</constant> bytes. The node address is the same as the <acronym>DA</acronym> field of the <varname>VS_NW_INFO</varname> management message described in the <citetitle>Firwmare Technical Reference Manual</citetitle>.
  178. </para>
  179. <para>
  180. If the node address is the <link linkend='oethernet-BroadcastAddress'>BroadcastAddress</link> then the associated station is no longer connected to the network. Consequently, the instance <link linkend='CPLStation-HostAddress'>HostAddress</link>, <link linkend='CPLStation-TxRate'>TxRate</link> and <link linkend='CPLStation-RxRate'>RxRate</link> properties are unreliable.
  181. </para>
  182. </section>
  183. <section id="CPLStation-NodeAddressString">
  184. <title>
  185. CPLStation::NodeAddressString
  186. </title>
  187. <funcsynopsis>
  188. <funcprototype>
  189. <funcdef>char const * <function>NodeAddressString</function></funcdef>
  190. <paramdef>void</paramdef>
  191. </funcprototype>
  192. </funcsynopsis>
  193. <para>
  194. Return the <link linkend='CPLStation-NodeAddress'>NodeAddress</link> property as a <constant>NUL</constant> terminated hexadecimal character string. The string will be <constant>ETHER_ADDR_LEN</constant>*<constant>3</constant> characters long including the terminator.
  195. </para>
  196. </section>
  197. <section id="CPLStation-PrefaceString">
  198. <title>
  199. CPLStation::PrefaceString
  200. </title>
  201. <funcsynopsis>
  202. <funcprototype>
  203. <funcdef>char const * <function>PrefaceString</function></funcdef>
  204. <paramdef>void</paramdef>
  205. </funcprototype>
  206. </funcsynopsis>
  207. <para>
  208. Return the station preface as a string. The station preface is a single-line title for the output produced printed by the <link linkend='CPLStation-Print'>Print</link> method. The only purpose it serves is to indicate the significance of each output field. Although shwn as a property, the string is implemented as a constant so parenthesis are omitted when referencing it. The string looks like this:
  209. </para>
  210. <screen>
  211. P/L NET TEI ------ MAC ------ ------ BDA ------ TX RX CHIPSET FIRMWARE
  212. </screen>
  213. </section>
  214. <section id="CPLStation-RoleName">
  215. <title>
  216. CPLStation::RoleName
  217. </title>
  218. <funcsynopsis>
  219. <funcprototype>
  220. <funcdef>unsigned <function>RoleName</function></funcdef>
  221. <paramdef>void</paramdef>
  222. </funcprototype>
  223. </funcsynopsis>
  224. <para>
  225. Return the <acronym>AVLN</acronym> station role as a <constant>NUL</constant> terminated character string. The string <constant>"STA"</constant> means the station is an ordinary station. The string <constant>"CCO"</constant> means the station is the Central Co-ordinator. See the <citetitle>HomePlug AV Specification</citetitle> for an explanation of station roles.
  226. </para>
  227. </section>
  228. <section id="CPLStation-RoleType">
  229. <title>
  230. CPLStation::RoleType
  231. </title>
  232. <funcsynopsis>
  233. <funcprototype>
  234. <funcdef>unsigned <function>RoleType</function></funcdef>
  235. <paramdef>void</paramdef>
  236. </funcprototype>
  237. </funcsynopsis>
  238. <para>
  239. Return the <acronym>AVLN</acronym> station role as an unsigned integer. The value <constant>0</constant> means the station is an oridnary station (<acronym>STA</acronym>). The value <constant>1</constant> means the station is the Central Co-ordinator (<acronym>CCo</acronym>). See the <citetitle>HomePlug AV Specification</citetitle> for an explanation of station roles.
  240. </para>
  241. </section>
  242. <section id="CPLStation-RxRate">
  243. <title>
  244. CPLStation::RxRate
  245. </title>
  246. <funcsynopsis>
  247. <funcprototype>
  248. <funcdef>unsigned <function>RxRate</function></funcdef>
  249. <paramdef>void</paramdef>
  250. </funcprototype>
  251. </funcsynopsis>
  252. <para>
  253. Return the station receive PHY rate in megabits per second as an unsigned integer. The receive rate applies only to traffic transmitted by this station to the reference station. It is the same as the <varname>AVGRX</varname> field in the <varname>VS_NW_INFO</varname> managment message described in the <citetitle>Firmware Technical Reference Manual</citetitle>.
  254. </para>
  255. </section>
  256. <section id="CPLStation-StationID">
  257. <title>
  258. CPLStation::StationID
  259. </title>
  260. <funcsynopsis>
  261. <funcprototype>
  262. <funcdef>unsigned <function>StationID</function></funcdef>
  263. <paramdef>void</paramdef>
  264. </funcprototype>
  265. </funcsynopsis>
  266. <para>
  267. Return the <acronym>AVLN</acronym> station number. The station number is the same as the <varname>TEI</varname> field of the <varname>VS_NW_INFO</varname> management message described in the <citetitle>Firmware Technical Reference Manual</citetitle>. Every station on an <acronym>AVLN</acronym> has a unique station number.
  268. </para>
  269. </section>
  270. <section id="CPLStation-TxRate">
  271. <title>
  272. CPLStation::TxRate
  273. </title>
  274. <funcsynopsis>
  275. <funcprototype>
  276. <funcdef>unsigned <function>TxRate</function></funcdef>
  277. <paramdef>void</paramdef>
  278. </funcprototype>
  279. </funcsynopsis>
  280. <para>
  281. Return the station transmit PHY rate in megabits per second as an unsigned integer. The transmit rate applies only to traffic received by this this station from the reference station. It is the same as the <varname>AVGTX</varname> field in the <varname>VS_NW_INFO</varname> managment message described in the <citetitle>Firmware Technical Reference Manual</citetitle>.
  282. </para>
  283. </section>
  284. </section>
  285. <section id="CPLStation-methods">
  286. <title>
  287. Methods
  288. </title>
  289. <para>
  290. This class inherits no methods.
  291. </para>
  292. <section id="CPLStation-Preface">
  293. <title>
  294. CPLStation::Preface
  295. </title>
  296. <funcsynopsis>
  297. <funcprototype>
  298. <funcdef>CPLStation &amp; <function>Preface</function></funcdef>
  299. <paramdef>void</paramdef>
  300. </funcprototype>
  301. </funcsynopsis>
  302. <para>
  303. Print the <link linkend='CPLStation-PrefaceString'>PrefaceString</link> on stdout followed by a newline. This method is optional but may be called prior to printing station details. Sample output follows.
  304. </para>
  305. </section>
  306. <section id="CPLStation-Print">
  307. <title>
  308. CPLStation::Print
  309. </title>
  310. <funcsynopsis>
  311. <funcprototype>
  312. <funcdef>CPLStation &amp; <function>Print</function></funcdef>
  313. <paramdef>void</paramdef>
  314. </funcprototype>
  315. </funcsynopsis>
  316. <para>
  317. Print class properties in a human readable format on stdout. Example output follows. The fields show local or remote connection, station or CCo status, station hardware address, bridged device hardware address, transmit PHY rate, receive PHY rate, hardware type and firmware revision.
  318. </para>
  319. <screen>
  320. REM STA 002 00:B0:52:DE:AD:01 00:07:E9:F6:42:51 145 147 INT6000 INT6000-MAC-4-1-4101-00-3646-20090615-BETA1-B
  321. </screen>
  322. </section>
  323. </section>
  324. <section id="CPLStation-Constructors">
  325. <title>
  326. Constructors
  327. </title>
  328. <para>
  329. </para>
  330. <funcsynopsis>
  331. <funcprototype>
  332. <funcdef><function>CPLStation</function></funcdef>
  333. <paramdef>void</paramdef>
  334. </funcprototype>
  335. </funcsynopsis>
  336. <para>
  337. Instantiates the class as an empty powerline station. Class <link linkend='CPLNetwork'>CPLNetwork</link> instantiates this class and initializes class properties.
  338. </para>
  339. </section>
  340. <section id="CPLStation-examples">
  341. <title>
  342. Examples
  343. </title>
  344. <para>
  345. None.
  346. </para>
  347. </section>
  348. </chapter>