![background image](http://html1.mh-extra.com/html/rabbit/rabbitcore-rcm3309/rabbitcore-rcm3309_user-manual_3119427175.webp)
Distributor of Digi International: Excellent Integrated System Limited
Datasheet of 20-101-1194 - MODULE RABBITCORE RCM3309 ROHS
Contact us: [email protected] Website: www.integrated-circuit.com
168
RabbitCore RCM3309/RCM3319
rn_find
int rn_find(rn_search *srch);
DESCRIPTION
Locates the first active device that matches the search criteria.
PARAMETER
srch
the search criteria structure
rn_search:
unsigned int flags; // status flags see MATCH macros below
unsigned int ports; // port bitmask
char productid; // product id
char productrev; // product rev
char coderev; // code rev
long serialnum; // serial number
Use a maximum of 3 macros for the search criteria:
RN_MATCH_PORT // match port bitmask
RN_MATCH_PNA // match physical node address
RN_MATCH_HANDLE // match instance (reg 3)
RN_MATCH_PRDID // match id/version (reg 1)
RN_MATCH_PRDREV // match product revision
RN_MATCH_CODEREV // match code revision
RN_MATCH_SN // match serial number
For example:
rn_search newdev;
newdev.flags = RN_MATCH_PORT|RN_MATCH_SN;
newdev.ports = 0x03; //search ports 0 and 1
newdev.serialnum = E3446C01L;
handle = rn_find(&newdev);
RETURN VALUE
Returns the handle of the first device matching the criteria.
0 indicates no such devices were found.
SEE ALSO
rn_device
175 / 191
175 / 191