indiapi.h   indiapi.h 
skipping to change at line 50 skipping to change at line 50
\section Development Developing under INDI \section Development Developing under INDI
<p>Please refere to the <a href="http://indi.sourceforge.net/index.php/Manu al">INDI Developers Manual</a> for a complete guide on INDI's driver develo pemnt framework.</p> <p>Please refere to the <a href="http://indi.sourceforge.net/index.php/Manu al">INDI Developers Manual</a> for a complete guide on INDI's driver develo pemnt framework.</p>
<p>The INDI Library API is divided into the following main sections:</p> <p>The INDI Library API is divided into the following main sections:</p>
<ul> <ul>
<li><a href="indidevapi_8h.html">INDI Device API</a></li> <li><a href="indidevapi_8h.html">INDI Device API</a></li>
<li><a href="indicom_8h.html">INDI Common Routine Library</a></li> <li><a href="indicom_8h.html">INDI Common Routine Library</a></li>
<li><a href="lilxml_8h.html">INDI LilXML Library</a></li> <li><a href="lilxml_8h.html">INDI LilXML Library</a></li>
<li><a href="http://heasarc.gsfc.nasa.gov/docs/software/fitsio/c/c_user/cfi <li><a href="group__configFunctions.html">Configuration</a></li>
tsio.html">CFITSIO Library</a></li> <li><a href="classINDI_1_1BaseClient.html">Client API</a></li>
</ul> </ul>
\section Help \section Help
You can find information on INDI development in the <a href="http://indi.sf .net">INDI sourceforge</a> site. Furthermore, you can discuss INDI related issues on the <a href="http://sourceforge.net/mail/?group_id=90275">INDI de velopment mailing list</a>. You can find information on INDI development in the <a href="http://indi.sf .net">INDI sourceforge</a> site. Furthermore, you can discuss INDI related issues on the <a href="http://sourceforge.net/mail/?group_id=90275">INDI de velopment mailing list</a>.
\author Elwood Downey \author Elwood Downey
\author Jasem Mutlaq \author Jasem Mutlaq
*/ */
skipping to change at line 74 skipping to change at line 75
*/ */
/************************************************************************** ***** /************************************************************************** *****
* INDI wire protocol version implemented by this API. * INDI wire protocol version implemented by this API.
* N.B. this is indepedent of the API itself. * N.B. this is indepedent of the API itself.
*/ */
#define INDIV 1.7 #define INDIV 1.7
/* INDI Library version */ /* INDI Library version */
#define INDI_LIBV 0.6 #define INDI_LIBV 0.7
/************************************************************************** ***** /************************************************************************** *****
* Manifest constants * Manifest constants
*/ */
/** \typedef ISState /** \typedef ISState
\brief Switch state. \brief Switch state.
*/ */
typedef enum typedef enum
{ {
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 indidevapi.h   indidevapi.h 
skipping to change at line 299 skipping to change at line 299
{ {
B_NEVER=0, /*!< Never receive BLOBs */ B_NEVER=0, /*!< Never receive BLOBs */
B_ALSO, /*!< Receive BLOBs along with normal messages */ B_ALSO, /*!< Receive BLOBs along with normal messages */
B_ONLY /*!< ONLY receive BLOBs from drivers, ignore all other traff ic */ B_ONLY /*!< ONLY receive BLOBs from drivers, ignore all other traff ic */
} BLOBHandling; } BLOBHandling;
/** \brief Function a Driver calls to snoop on another Device. Snooped mess ages will then arrive via ISSnoopDevice. /** \brief Function a Driver calls to snoop on another Device. Snooped mess ages will then arrive via ISSnoopDevice.
\param snooped_device name of the device to snoop. \param snooped_device name of the device to snoop.
\param snooped_property name of the snooped property in the device. \param snooped_property name of the snooped property in the device.
*/ */
extern void IDSnoopDevice (const char *snooped_device, char *snooped_proper ty); extern void IDSnoopDevice (const char *snooped_device, const char *snooped_ property);
/** \brief Function a Driver calls to control whether they will receive BLO Bs from snooped devices. /** \brief Function a Driver calls to control whether they will receive BLO Bs from snooped devices.
\param snooped_device_name name of the device to snoop. \param snooped_device name of the device to snoop.
\param bh How drivers handle BLOBs incoming from snooping drivers. \param bh How drivers handle BLOBs incoming from snooping drivers.
*/ */
extern void IDSnoopBLOBs (const char *snooped_device, BLOBHandling bh); extern void IDSnoopBLOBs (const char *snooped_device, BLOBHandling bh);
/*@}*/ /*@}*/
/** /**
* \defgroup deventFunctions IE Functions: Functions drivers call to regist er with the INDI event utilities. * \defgroup deventFunctions IE Functions: Functions drivers call to regist er with the INDI event utilities.
Callbacks are called when a read on a file descriptor will not block. Timers are called once after a specified interval. Workprocs are called whe n there is nothing else to do. The "Add" functions return a unique id for u se with their corresponding "Rm" removal function. An arbitrary pointer may be specified when a function is registered which will be stored and forwar ded unchanged when the function is later invoked. Callbacks are called when a read on a file descriptor will not block. Timers are called once after a specified interval. Workprocs are called whe n there is nothing else to do. The "Add" functions return a unique id for u se with their corresponding "Rm" removal function. An arbitrary pointer may be specified when a function is registered which will be stored and forwar ded unchanged when the function is later invoked.
skipping to change at line 399 skipping to change at line 399
framework for tasks commonly required in the processing of client framework for tasks commonly required in the processing of client
messages. It is not strictly necessary to use these functions, but it messages. It is not strictly necessary to use these functions, but it
both prudent and efficient to do so.</P> both prudent and efficient to do so.</P>
<p>These do not communicate with the Client in any way.</p> <p>These do not communicate with the Client in any way.</p>
*/ */
/*@{*/ /*@{*/
/** \brief Find an IText member in a vector text property. /** \brief Find an IText member in a vector text property.
* *
* \param tp a pointer to a text vector property. * \param tvp a pointer to a text vector property.
* \param name the name of the member to search for. * \param name the name of the member to search for.
* \return a pointer to an IText member on match, or NULL if nothing is foun d. * \return a pointer to an IText member on match, or NULL if nothing is foun d.
*/ */
extern IText *IUFindText (const ITextVectorProperty *tp, const char *nam e); extern IText *IUFindText (const ITextVectorProperty *tvp, const char *na me);
/** \brief Find an INumber member in a number text property. /** \brief Find an INumber member in a number text property.
* *
* \param tp a pointer to a number vector property. * \param nvp a pointer to a number vector property.
* \param name the name of the member to search for. * \param name the name of the member to search for.
* \return a pointer to an INumber member on match, or NULL if nothing is fo und. * \return a pointer to an INumber member on match, or NULL if nothing is fo und.
*/ */
extern INumber *IUFindNumber(const INumberVectorProperty *tp, const char *n ame); extern INumber *IUFindNumber(const INumberVectorProperty *nvp, const char * name);
/** \brief Find an ISwitch member in a vector switch property. /** \brief Find an ISwitch member in a vector switch property.
* *
* \param tp a pointer to a switch vector property. * \param svp a pointer to a switch vector property.
* \param name the name of the member to search for. * \param name the name of the member to search for.
* \return a pointer to an ISwitch member on match, or NULL if nothing is fo und. * \return a pointer to an ISwitch member on match, or NULL if nothing is fo und.
*/ */
extern ISwitch *IUFindSwitch(const ISwitchVectorProperty *tp, const char *n extern ISwitch *IUFindSwitch(const ISwitchVectorProperty *svp, const char *
ame); name);
/** \brief Find an ILight member in a vector Light property.
*
* \param lvp a pointer to a Light vector property.
* \param name the name of the member to search for.
* \return a pointer to an ILight member on match, or NULL if nothing is fou
nd.
*/
extern ILight *IUFindLight(const ILightVectorProperty *lvp, const char *nam
e);
/** \brief Find an IBLOB member in a vector BLOB property.
*
* \param bvp a pointer to a BLOB vector property.
* \param name the name of the member to search for.
* \return a pointer to an IBLOB member on match, or NULL if nothing is foun
d.
*/
extern IBLOB *IUFindBLOB(const IBLOBVectorProperty *bvp, const char *name);
/** \brief Returns the first ON switch it finds in the vector switch proper ty. /** \brief Returns the first ON switch it finds in the vector switch proper ty.
* \note This is only valid for ISR_1OFMANY mode. That is, when only one s witch out of many is allowed to be ON. Do not use this function if you can have multiple ON switches in the same vector property. * \note This is only valid for ISR_1OFMANY mode. That is, when only one s witch out of many is allowed to be ON. Do not use this function if you can have multiple ON switches in the same vector property.
* *
* \param tp a pointer to a switch vector property. * \param sp a pointer to a switch vector property.
* \return a pointer to the \e first ON ISwitch member if found. If all swit ches are off, NULL is returned. * \return a pointer to the \e first ON ISwitch member if found. If all swit ches are off, NULL is returned.
*/ */
extern ISwitch *IUFindOnSwitch (const ISwitchVectorProperty *tp); extern ISwitch *IUFindOnSwitch (const ISwitchVectorProperty *sp);
/** \brief Reset all switches in a switch vector property to OFF. /** \brief Reset all switches in a switch vector property to OFF.
* *
* \param svp a pointer to a switch vector property. * \param svp a pointer to a switch vector property.
*/ */
extern void IUResetSwitch(ISwitchVectorProperty *svp); extern void IUResetSwitch(ISwitchVectorProperty *svp);
/** \brief Update all switches in a switch vector property. /** \brief Update all switches in a switch vector property.
* *
* \param svp a pointer to a switch vector property. * \param svp a pointer to a switch vector property.
skipping to change at line 513 skipping to change at line 529
extern void IUFillNumber(INumber *np, const char *name, const char * label, const char *format, double min, double max, double step, double value); extern void IUFillNumber(INumber *np, const char *name, const char * label, const char *format, double min, double max, double step, double value);
/** \brief Assign attributes for a text property. The text's auxiliary elem ents will be set to NULL. /** \brief Assign attributes for a text property. The text's auxiliary elem ents will be set to NULL.
\param tp pointer a text property to fill \param tp pointer a text property to fill
\param name the text name \param name the text name
\param label the text label \param label the text label
\param initialText the initial text \param initialText the initial text
*/ */
extern void IUFillText(IText *tp, const char *name, const char * label, con st char *initialText); extern void IUFillText(IText *tp, const char *name, const char * label, con st char *initialText);
/** \brief Assign attributes for a BLOB property. The BLOB's data and auxil
iary elements will be set to NULL.
\param bp pointer a BLOB property to fill
\param name the BLOB name
\param label the BLOB label
\param format the BLOB format.
*/
extern void IUFillBLOB(IBLOB *bp, const char *name, const char * label, con
st char *format);
/** \brief Assign attributes for a switch vector property. The vector's aux iliary elements will be set to NULL. /** \brief Assign attributes for a switch vector property. The vector's aux iliary elements will be set to NULL.
\param svp pointer a switch vector property to fill \param svp pointer a switch vector property to fill
\param sp pointer to an array of switches \param sp pointer to an array of switches
\param nsp the dimension of sp \param nsp the dimension of sp
\param dev the device name this vector property belongs to \param dev the device name this vector property belongs to
\param name the vector property name \param name the vector property name
\param label the vector property label \param label the vector property label
\param group the vector property group \param group the vector property group
\param p the vector property permission \param p the vector property permission
\param r the switches behavior \param r the switches behavior
skipping to change at line 568 skipping to change at line 592
\param dev the device name this vector property belongs to \param dev the device name this vector property belongs to
\param name the vector property name \param name the vector property name
\param label the vector property label \param label the vector property label
\param group the vector property group \param group the vector property group
\param p the vector property permission \param p the vector property permission
\param timeout vector property timeout in seconds \param timeout vector property timeout in seconds
\param s the vector property initial state. \param s the vector property initial state.
*/ */
extern void IUFillTextVector(ITextVectorProperty *tvp, IText *tp, int ntp, const char * dev, const char *name, const char *label, const char* group, I Perm p, double timeout, IPState s); extern void IUFillTextVector(ITextVectorProperty *tvp, IText *tp, int ntp, const char * dev, const char *name, const char *label, const char* group, I Perm p, double timeout, IPState s);
/** \brief Assign attributes for a BLOB vector property. The vector's auxil
iary elements will be set to NULL.
\param bvp pointer a BLOB vector property to fill
\param bp pointer to an array of BLOBs
\param nbp the dimension of bp
\param dev the device name this vector property belongs to
\param name the vector property name
\param label the vector property label
\param group the vector property group
\param p the vector property permission
\param timeout vector property timeout in seconds
\param s the vector property initial state.
*/
extern void IUFillBLOBVector(IBLOBVectorProperty *bvp, IBLOB *bp, int nbp,
const char * dev, const char *name, const char *label, const char* group, I
Perm p, double timeout, IPState s);
/** \brief Update a snooped number vector property from the given XML root element. /** \brief Update a snooped number vector property from the given XML root element.
\param root XML root elememnt containing the snopped property content \param root XML root elememnt containing the snopped property content
\param nvp a pointer to the number vector property to be updated. \param nvp a pointer to the number vector property to be updated.
\return 0 if cracking the XML element and updating the property proceed ed without errors, -1 if trouble. \return 0 if cracking the XML element and updating the property proceed ed without errors, -1 if trouble.
*/ */
extern int IUSnoopNumber (XMLEle *root, INumberVectorProperty *nvp); extern int IUSnoopNumber (XMLEle *root, INumberVectorProperty *nvp);
/** \brief Update a snooped text vector property from the given XML root el ement. /** \brief Update a snooped text vector property from the given XML root el ement.
\param root XML root elememnt containing the snopped property content \param root XML root elememnt containing the snopped property content
\param tvp a pointer to the text vector property to be updated. \param tvp a pointer to the text vector property to be updated.
skipping to change at line 698 skipping to change at line 736
\param root The argument contains the full message exactly as it was se nt by the driver. \param root The argument contains the full message exactly as it was se nt by the driver.
\e Hint: use the IUSnoopXXX utility functions to help crack the message if it was one of setXXX or defXXX. \e Hint: use the IUSnoopXXX utility functions to help crack the message if it was one of setXXX or defXXX.
*/ */
extern void ISSnoopDevice (XMLEle *root); extern void ISSnoopDevice (XMLEle *root);
/*@}*/ /*@}*/
/* Handy readability macro to avoid unused variables warnings */ /* Handy readability macro to avoid unused variables warnings */
#define INDI_UNUSED(x) (void) x #define INDI_UNUSED(x) (void) x
/** \brief Extract dev and name attributes from an XML element.
\param root The XML element to be parsed.
\param dev pointer to an allocated buffer to save the extracted element
device name attribute.
The buffer size must be at least MAXINDIDEVICE bytes.
\param name pointer to an allocated buffer to save the extracted elemen
ted name attribute.
The buffer size must be at least MAXINDINAME bytes.
\param msg pointer to an allocated char buffer to store error messages.
The minimum buffer size is MAXRBUF.
\return 0 if successful, -1 if error is encountered and msg is set.
*/
extern int crackDN (XMLEle *root, char **dev, char **name, char msg[]);
/** \brief Extract property state (Idle, OK, Busy, Alert) from the supplied
string.
\param str A string representation of the state.
\param ip Pointer to IPState structure to store the extracted property
state.
\return 0 if successful, -1 if error is encountered.
*/
extern int crackIPState (const char *str, IPState *ip);
/** \brief Extract switch state (On or Off) from the supplied string.
\param str A string representation of the switch state.
\param ip Pointer to ISState structure to store the extracted switch st
ate.
\return 0 if successful, -1 if error is encountered.
*/
extern int crackISState (const char *str, ISState *ip);
/** \brief Extract property permission state (RW, RO, WO) from the supplied
string.
\param str A string representation of the permission state.
\param ip Pointer to IPerm structure to store the extracted permission
state.
\return 0 if successful, -1 if error is encountered.
*/
extern int crackIPerm (const char *str, IPerm *ip);
/** \brief Extract switch rule (OneOfMany, OnlyOne..etc) from the supplied
string.
\param str A string representation of the switch rule.
\param ip Pointer to ISRule structure to store the extracted switch rul
e.
\return 0 if successful, -1 if error is encountered.
*/
extern int crackISRule (const char *str, ISRule *ip);
/** \return Returns a string representation of the supplied property state.
*/
extern const char *pstateStr(IPState s);
/** \return Returns a string representation of the supplied switch status.
*/
extern const char *sstateStr(ISState s);
/** \return Returns a string representation of the supplied switch rule. */
extern const char *ruleStr(ISRule r);
/** \return Returns a string representation of the supplied permission valu
e. */
extern const char *permStr(IPerm p);
extern void xmlv1(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 13 change blocks. 
11 lines changed or deleted 120 lines changed or added


 lilxml.h   lilxml.h 
skipping to change at line 249 skipping to change at line 249
/** \brief Print an XML element. /** \brief Print an XML element.
\param fp a pointer to FILE where the print output is directed. \param fp a pointer to FILE where the print output is directed.
\param e the XML element to print. \param e the XML element to print.
\param level the printing level, set to 0 to print the whole element. \param level the printing level, set to 0 to print the whole element.
*/ */
extern void prXMLEle (FILE *fp, XMLEle *e, int level); extern void prXMLEle (FILE *fp, XMLEle *e, int level);
/** \brief sample print ep to string s. /** \brief sample print ep to string s.
* N.B. s must be at least as large as that reported by sprlXMLEle()+1. * N.B. s must be at least as large as that reported by sprlXMLEle()+1.
* N.B. set level = 0 on first call. * N.B. set level = 0 on first call.
* \return return length of resulting string (sans trailing \0) * \return return length of resulting string (sans trailing @\0@)
*/ */
extern int sprXMLEle (char *s, XMLEle *ep, int level); extern int sprXMLEle (char *s, XMLEle *ep, int level);
/** \brief return number of bytes in a string guaranteed able to hold resul t of sprXLMEle(ep) (sans trailing \0). /** \brief return number of bytes in a string guaranteed able to hold resul t of sprXLMEle(ep) (sans trailing @\0@).
* N.B. set level = 0 on first call. * N.B. set level = 0 on first call.
*/ */
extern int sprlXMLEle (XMLEle *ep, int level); extern int sprlXMLEle (XMLEle *ep, int level);
/* install alternatives to malloc/realloc/free */ /* install alternatives to malloc/realloc/free */
extern void indi_xmlMalloc (void *(*newmalloc)(size_t size), extern void indi_xmlMalloc (void *(*newmalloc)(size_t size),
void *(*newrealloc)(void *ptr, size_t size), void (*newfree)(void *ptr) ); void *(*newrealloc)(void *ptr, size_t size), void (*newfree)(void *ptr) );
/*@}*/ /*@}*/
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/