= Rappture/Fortran API = Currently in development are the fortran bindings to the Rappture Development Toolkit. Function and Subroutine Index: -- Rappture I/O -- integer '''rp_lib''' (character ''path'') [[BR]] call '''rp_lib_element_comp''' (integer ''handle'', character ''path'', character ''retText'') [[BR]] call '''rp_lib_element_id''' (integer ''handle'', character ''path'', character ''retText'') [[BR]] call '''rp_lib_element_type''' (integer ''handle'', character ''path'', character ''retText'') [[BR]] integer '''rp_lib_element_obj''' (integer ''handle'', character ''path'') [[BR]] integer '''rp_lib_children''' (integer ''handle'', character ''path'', character ''prevChildHandle'')[[BR]] call '''rp_lib_get''' (integer ''handle'', character ''path'', character ''retText'') [[BR]] call '''rp_lib_get_str''' (integer ''handle'', character ''path'', character ''retText'') [[BR]] double '''rp_lib_get_double''' (integer ''handle'', character ''path'') [[BR]] integer '''rp_lib_get_integer''' (integer ''handle'', character ''path'') [[BR]] integer '''rp_lib_get_boolean''' (integer ''handle'', character ''path'') [[BR]] call '''rp_lib_put_str''' (integer ''handle'', character ''path'', character ''value'', integer ''append'') [[BR]] call '''rp_lib_put_data''' (integer ''handle'', character ''path'', character ''bytes'', integer ''nbytes'', integer ''append'') [[BR]] call '''rp_lib_put_file''' (integer ''handle'', character ''path'', character ''fileName'', integer ''compress'', integer ''append'') [[BR]] call '''rp_lib_node_comp''' (integer ''handle'', character ''retText'') [[BR]] call '''rp_lib_node_type''' (integer ''handle'', character ''retText'') [[BR]] call '''rp_lib_node_id''' (integer ''handle'', character ''retText'') [[BR]] call '''rp_lib_xml''' (integer ''handle'', character ''retText'')[[BR]] call '''rp_result''' (integer ''handle'')[[BR]] -- Rappture Units -- [[BR]] integer '''rp_define_unit''' (character ''unitName'', integer ''basisName'') [[BR]] integer '''rp_find''' (character ''searchName'') [[BR]] call '''rp_get_units''' (integer ''unitRefVal'', character ''retText'') [[BR]] call '''rp_get_units_name''' (integer ''unitRefVal'', character ''retText'') [[BR]] integer '''rp_get_exponent''' (integer ''unitRefVal'', double ''retExponent'') [[BR]] integer '''rp_get_basis''' (integer ''unitRefVal'') [[BR]] integer '''rp_units_convert_dbl''' (character ''fromVal'', character ''toUnitsName'', double ''convResult'') [[BR]] integer '''rp_units_convert_str''' (character ''fromVal'', character ''toUnitsName'' character ''retText'') [[BR]] integer '''rp_units_add_preset''' (character ''presetName'') [[BR]] -- Rappture Utils -- [[BR]] integer '''rp_utils_progress''' (integer ''percent'', character ''message'') [[BR]] ------------------------------------------------------------------------------------- [[BR]] Code Synopsis & Examples: [[BR]] [[BR]] integer '''rp_lib''' (character ''path'') Purpose:[[BR]] Retrieve an object reference (handle) to the file pointed to by ''path'' for accessing member functions of Rappture [[BR]] Input Arguments: [[BR]] 1. character ''path'' - non-null c style string providing the path to an xml file[[BR]] Return Value:[[BR]] User reference (handle) to the Rappture library [[BR]] Notes: [[BR]] 1. User must request a handle to Rappture before accessing any member functions of the library. [[BR]] 2. On success the return value will be a positive integer [[BR]] 3. ''path'' must be a non-null c-style string [[BR]] {{{ integer handle, rp_lib handle = rp_lib("tool.xml") print *,handle c Result: c 1 }}} call '''rp_lib_element_comp''' (integer ''handle'', character ''path'', character ''retText'') [[BR]] Purpose:[[BR]] This method searches the Rappture Library Object ''handle'' for the [[BR]] node at the location described by ''path'' and returns its [[BR]] component name, a concatination of the type, id, and index. [[BR]] If path is an empty string, the root of the node is used. ''handle'' [[BR]] is the handle representing the instance of the RpLibrary object. [[BR]] Input Arguments: [[BR]] 1. integer ''handle'' - user reference to the Rappture library. [[BR]] 2. character ''path'' - xml DOM object path. [[BR]] 3. character ''retText'' - component name of the path being searched. [[BR]] Return Value: [[BR]] None.[[BR]] Notes: [[BR]] None.[[BR]] {{{ c Example contents of driver.xml file c c c c K c 300K c 300K c c c character*100 path,retText integer libHandle, rp_lib libHandle = rp_lib("driver.xml") path = "input.number(temperature)" call rp_lib_element_comp(libHandle,path,retText) print *,retText c Result: c number(temperature) }}} call '''rp_lib_element_id''' (integer ''handle'', character ''path'', character ''retText'') [[BR]] Purpose:[[BR]] This method searches the Rappture Library Object ''handle'' for the [[BR]] node at the location described by ''path'' and returns its id attribute. [[BR]] If path is an empty string, the root of the node is used. ''handle'' [[BR]] is the handle representing the instance of the RpLibrary object. [[BR]] Input Arguments: [[BR]] 1. integer ''handle'' - user reference to the Rappture library. [[BR]] 2. character ''path'' - xml DOM object path. [[BR]] 3. character ''retText'' - component name of the path being searched. [[BR]] Return Value: [[BR]] None.[[BR]] Notes: [[BR]] None.[[BR]] {{{ c Example contents of driver.xml file c c c c K c 300K c 300K c c c character*100 path,retText integer libHandle, rp_lib libHandle = rp_lib("driver.xml") path = "input.number(temperature)" call rp_lib_element_id(libHandle,path,retText) print *,retText c Result: c temperature }}} call '''rp_lib_element_type''' (integer ''handle'', character ''path'', character ''retText'') [[BR]] Purpose:[[BR]] This method searches the Rappture Library Object ''handle'' for the [[BR]] node at the location described by ''path'' and returns type of node being searched. [[BR]] If path is an empty string, the root of the node is used. ''handle'' [[BR]] is the handle representing the instance of the RpLibrary object. [[BR]] Input Arguments: [[BR]] 1. integer ''handle'' - user reference to the Rappture library. [[BR]] 2. character ''path'' - xml DOM object path. [[BR]] 3. character ''retText'' - component name of the path being searched. [[BR]] Return Value: [[BR]] None.[[BR]] Notes: [[BR]] None.[[BR]] {{{ c Example contents of driver.xml file c c c c K c 300K c 300K c c c character*100 path,retText integer libHandle, rp_lib libHandle = rp_lib("driver.xml") path = "input.number(temperature)" call rp_lib_element_type(libHandle,path,retText) print *,retText c Result: c number }}} integer '''rp_lib_element_obj''' (integer ''handle'', character ''path'') [[BR]] Purpose:[[BR]] This method searches the Rappture Library Object ''handle'' for the [[BR]] node at the location described by ''path'' and returns an integer handle to the node. [[BR]] If path is an empty string, the root of the node is used. ''handle'' [[BR]] is the handle representing the instance of the RpLibrary object. [[BR]] Input Arguments: [[BR]] 1. integer ''handle'' - user reference to the Rappture library. [[BR]] 2. character ''path'' - xml DOM object path. [[BR]] Return Value: [[BR]] The integer handle that is returned will be a non-zero value on success. A zero valued [[BR]] handle may indicate that the ''path'' being searched does not exists, the specific node [[BR]] being searched does not exists or there was some error in processing the request.[[BR]] Notes: [[BR]] None.[[BR]] {{{ c Example contents of driver.xml file c c c c K c 300K c 300K c c c character*100 path integer rp_lib_element_obj, newHandle integer libHandle, rp_lib libHandle = rp_lib("driver.xml") path = "input.number(temperature)" newHandle = rp_lib_element_obj(libHandle,path) print *,newHandle c Result: c 1 }}} integer '''rp_lib_children''' (integer ''handle'', character ''path'', character ''prevChildHandle'')[[BR]] Purpose:[[BR]] This method searches the Rappture Library Object ''handle'' for the [[BR]] node at the location described by ''path'' and returns its [[BR]] children. If 'prevChildHandle' = 0, then the [[BR]] first child is returned, else, the next child is retrieved. [[BR]] If 'prevChildHandle' is an invalid child handle, an error value will be returned. [[BR]] Subsequent calls to rpLibChildren() should use previously [[BR]] returned values for it 'prevChildHandle' argument. [[BR]] Input Arguments: [[BR]] 1. integer ''handle'' - user reference to the Rappture library.[[br]] 2. character ''path'' - xml DOM object path.[[br]] 3. integer ''prevChildHandle'' - index of the child being requested. Useful when a list of children are returned and you want to iterate through all of the children.[[br]] Return Value: [[BR]] On successful, a positive integer will be returned, representing the handle of the next returned handle. On failure, zero will be returned denoting that either no more children are available or there was an error in processing the request.[[BR]] Notes: [[BR]] 1. ''path'' must be a non-null c-style string. [[BR]] 2. In the rappture-linux-i686-20051107.tar.gz package, there is a bug that does not allow this function to work properly. The problem has been fixed in the svn repository and will be availabile in all future releases. [[BR]] {{{ c Example contents of driver.xml file c c c c K c 300K c 300K c c c m c 2.2m c 3.4m c c c kg c 0.3kg c 0.3kg c c c character*100 retText integer rp_lib_children, childHandle, prevChildHandle integer libHandle, rp_lib libHandle = rp_lib("driver.xml") prevChildHandle = 0 childHandle = -1 10 continue childHandle = + rp_lib_children(libHandle,"input",prevChildHandle) if (childHandle .gt. 0) then call rp_lib_node_comp(childHandle,retText) print *,"component name: ",retText endif prevChildHandle = childHandle if (childHandle .gt. 0) goto 10 c Result: c component name: number(temperature) c component name: number(height) c component name: number(weight) }}} call '''rp_lib_get''' (integer ''handle'', character ''path'', character ''retText'') [[BR]] Purpose:[[BR]] Retrieve the element ''path'', which is associated with the document ''handle'', and return the data it encapsulates, placing the text into the ''retText''. [[BR]] Input Arguments: [[BR]] 1. integer ''handle'' - user reference to the Rappture library.[[br]] 2. character ''path'' - xml DOM object path.[[br]] 3. character ''retText'' - character array where text of the tail element in the requested path is stored on a successful return.[[br]] Return Value: [[BR]] On success, the data held within the ''path'' element will be written to retText.[[BR]] Notes: [[BR]] 1. ''path'' must be a non-null string. ''path'' may be an empty string (""). [[BR]] 2. Returned text will be truncated if ''retText'' does not have the capacity to hold the whole string. [[BR]] {{{ c Example contents of driver.xml file c c c c K c 300K c 300K c c c character*100 path,retText integer libHandle, rp_lib libHandle = rp_lib("driver.xml") path = "input.number(temperature).current" call rp_lib_get(libHandle,path,retText) print *,retText c Result: c 300K }}} integer '''rp_lib_get_integer''' (integer ''handle'', character ''path'') [[BR]] Purpose:[[BR]] Retrieve the element ''path'', which is associated with the document ''handle'', and return the integer value it encapsulates. [[BR]] Input Arguments: [[BR]] 1. integer ''handle'' - user reference to the Rappture library.[[br]] 2. character ''path'' - xml DOM object path.[[br]] Return Value: [[BR]] On success, the integer data held within the ''path'' element will be returned to the user.[[BR]] Notes: [[BR]] 1. ''path'' must be a non-null string. ''path'' may be an empty string (""). [[BR]] {{{ c Example contents of driver.xml file c c c c 0 c 10 c 3 c 5 c c c character*100 path integer rp_lib, rp_lib_get_integer integer libHandle, myNodes libHandle = rp_lib("driver.xml") path = "input.integer(nodes).current" myNodes = rp_lib_get_integer(libHandle,path) print *,myNodes c Result: c 5 }}} integer '''rp_lib_get_boolean''' (integer ''handle'', character ''path'') [[BR]] Purpose:[[BR]] Retrieve the element ''path'', which is associated with the document ''handle'', and return the boolean value it encapsulates as an integer. [[BR]] Input Arguments: [[BR]] 1. integer ''handle'' - user reference to the Rappture library.[[br]] 2. character ''path'' - xml DOM object path.[[br]] Return Value: [[BR]] On success, the integer data representing the boolean value held within the ''path'' element will be returned to the user.[[BR]] A value of 1 is returned for true, yes, on, and non-zero values that represent a boolean true. A value of 0 is returned for false, no, off, and zero values that represent a boolean false. Notes: [[BR]] 1. ''path'' must be a non-null string. ''path'' may be an empty string (""). [[BR]] {{{ c Example contents of driver.xml file c c c c true c true c c c character*100 path integer rp_lib, rp_lib_get_boolean integer libHandle, myNodes libHandle = rp_lib("driver.xml") path = "input.boolean(nodes).current" myNodes = rp_lib_get_boolean(libHandle,path) print *,myNodes c Result: c 1 }}} call '''rp_lib_put_str''' (integer ''handle'', character ''path'', character ''value'', integer ''append'') [[BR]] Purpose:[[BR]] Place the data ''value'' at location ''path'' inside the document associated with ''handle''. If the ''append'' flag is set to 1, then append the data ''value'' to data that may already be present in ''path''. If the ''append'' flag is set to 0, then overwrite any data that may be present.[[BR]] Input Arguments: [[BR]] 1. integer ''handle'' - user reference to the Rappture library.[[br]] 2. character ''path'' - xml DOM object path.[[br]] 3. character ''value'' - data to be held at location ''path''.[[br]] 5. integer ''append'' - flag denoting whether to overwrite (0) or append (1) ''value'' to the data at ''path''.[[br]] Return Value: [[BR]] None.[[BR]] Notes: [[BR]] 1. ''path'' must be a non-null string. ''path'' may be an empty string ("") to specify the root node. [[BR]] 3. Returned text will be truncated if ''retText'' does not have the capacity to hold the whole string. [[BR]] {{{ c Example contents of driver.xml file c c c c K c 300K c 300K c c c character*500 path,retText integer libHandle, rp_lib libHandle = rp_lib("driver.xml") path = "input.number(temperature).min" call rp_lib_put_str(libHandle,path,"10",0) call rp_lib_xml(libHandle,retText) print *,retText c Result: c c c c K c 300K c 300K c 10 c c c }}} call '''rp_lib_node_comp''' (integer ''handle'', character ''retText'') [[BR]] Purpose:[[BR]] Returns the component name of the node identified by ''handle'' and copies the text to ''retText''.[[BR]] The component name is a concatination of the type, id, and index. [[BR]] Input Arguments: [[BR]] 1. integer ''handle'' - user reference to the Rappture library node. [[BR]] 2. character ''retText'' - character array where component name text will be stored on succesful return. [[BR]] Return Value: [[BR]] None [[BR]] Notes: [[BR]] 1. ''handle'' must be a positive integer identifier of a library object. [[BR]] {{{ c Example contents of driver.xml file c c c c K c 300K c 300K c c c character*100 retText,path integer rp_lib_element_obj, newHandle integer libHandle, rp_lib libHandle = rp_lib("driver.xml") path = "input.number(temperature)" newHandle = rp_lib_element_obj(libHandle,path) call rp_lib_node_comp(newHandle,retText) print *,retText c Result: c number(temperature) }}} call '''rp_lib_node_type''' (integer ''handle'', character ''retText'') [[BR]] Purpose:[[BR]] Returns the type of the node identified by ''handle'' and copies the text to ''retText''.[[BR]] Input Arguments: [[BR]] 1. integer ''handle'' - user reference to the Rappture library node. [[BR]] 2. character ''retText'' - character array where node type will be stored on succesful return. [[BR]] Return Value: [[BR]] None [[BR]] Notes: [[BR]] 1. ''handle'' must be a positive integer identifier of a library object. [[BR]] {{{ c Example contents of driver.xml file c c c c K c 300K c 300K c c c character*100 retText,path integer rp_lib_element_obj, newHandle integer libHandle, rp_lib libHandle = rp_lib("driver.xml") path = "input.number(temperature)" newHandle = rp_lib_element_obj(libHandle,path) call rp_lib_node_type(newHandle,retText) print *,retText c Result: c number }}} call '''rp_lib_node_id''' (integer ''handle'', character ''retText'') [[BR]] Purpose:[[BR]] Returns the id of the node identified by ''handle'' and copies the text to ''retText''.[[BR]] Input Arguments: [[BR]] 1. integer ''handle'' - user reference to the Rappture library node. [[BR]] 2. character ''retText'' - character array where id will be stored on succesful return. [[BR]] Return Value: [[BR]] None [[BR]] Notes: [[BR]] 1. ''handle'' must be a positive integer identifier of a library object. [[BR]] {{{ c Example contents of driver.xml file c c c c K c 300K c 300K c c c character*100 retText,path integer rp_lib_element_obj, newHandle integer libHandle, rp_lib libHandle = rp_lib("driver.xml") path = "input.number(temperature)" newHandle = rp_lib_element_obj(libHandle,path) call rp_lib_node_id(newHandle,retText) print *,retText c Result: c temperature }}} call '''rp_lib_xml''' (integer ''handle'', character ''retText'')[[BR]] Purpose:[[BR]] Get the xml text of the document associated with ''handle''. Xml text will be stored in ''retText''.[[BR]] Input Arguments: [[BR]] 1. integer ''handle'' - user reference to the Rappture library. [[BR]] 2. character ''retText'' - character array where xml text will be stored on succesful return. [[BR]] Return Value: [[BR]] None [[BR]] Notes: [[BR]] 1. ''handle'' must be a positive integer identifier of a library object. [[BR]] 2. ''retText'' must not be NULL. On successful return, ''retText'' will hold the xml text of the library associated with ''handle'' [[BR]] {{{ c Example contents of driver.xml file c c c c K c 300K c 300K c c c character*500 retText integer libHandle, rp_lib libHandle = rp_lib("driver.xml") call rp_lib_xml(libHandle,retText) print *,retText c Result: c c c c K c 300K c 300K c c c }}} call '''rp_result''' (integer ''handle'') [[BR]] Purpose:[[BR]] Usually the last call of the program, this function signals to the gui [[BR]] that processing has completed and the output is ready to be [[BR]] displayed [[BR]] Input Arguments: [[BR]] 1. integer ''handle'' - user reference to the Rappture library.[[br]] Return Value: [[BR]] None.[[BR]] Notes: [[BR]] On Success, a unique run.xml file will be generated holding the inputs and outputs of[[BR]] the simulation. Also a signal will be sent to the gui. The gui will retieve the signal[[BR]] and generate output graphs as necessary[[BR]] {{{ c Example contents of driver.xml file c c c c K c 300K c 300K c c c integer libHandle, rp_lib libHandle = rp_lib("driver.xml") call rp_result(libHandle) c Result: c unique run.xml file is written c signal sent to gui stating processing has completed. }}} integer '''rp_define_unit''' (character ''unitName'', integer ''basisName'') [[BR]] Purpose:[[BR]] define a unit by the symbol of ''unitName'' which has basis identified by the integer unit handle ''basisName''.[[BR]] Input Arguments: [[BR]] 1. character ''unitName'' - character array of the unit symbol. [[BR]] 2. integer ''basisName'' - user (handle) reference to the Rappture defined unit representing the basis. [[BR]] Return Value: [[BR]] Integer handle representing the unit just defined. [[BR]] Notes: [[BR]] 1. a ''basisNmae'' of zero (0) represents no basis for the unit. [[BR]] {{{ }}} integer '''rp_find''' (character ''searchName'') [[BR]] Purpose:[[BR]] Retrieve a handle for a Rappture Units Object.[[BR]] Input Arguments: [[BR]] 1. character ''searchName'' - character array of symbols representing the Rappture Unit being searched for. [[BR]] Return Value: [[BR]] Integer value holding a handle for the Rappture Units Object being searched for. [[BR]] Notes: [[BR]] 1. Repeat calls of rp_find with the same ''searchName'' will not produce the same return value. A new handle will be allocated. [[BR]] {{{ }}} call '''rp_get_units''' (integer ''unitRefVal'', character ''retText'') [[BR]] Purpose:[[BR]] retrieve the text portion of the symbol representing the Rappture Units Object whose handle is ''unitRefVal''.[[BR]] Input Arguments: [[BR]] 1. integer ''unitRefVal'' - handle for a RapptureUnits Object. [[BR]] 2. character ''retText'' - character array where the text portion of the symbol representing the Rappture Units Object will be stored. [[BR]] Return Value: [[BR]] None [[BR]] Notes: [[BR]] 1. ''retText'' must not be NULL. On successful return, ''retText'' will hold the text portion of the symbol of the Rappture Units Object associated with ''unitRefVal'' [[BR]] {{{ }}} call '''rp_get_units_name''' (integer ''unitRefVal'', character ''retText'') [[BR]] Purpose:[[BR]] retrieve the whole symbol representing the Rappture Units Object whose handle is ''unitRefVal''.[[BR]] Input Arguments: [[BR]] 1. integer ''unitRefVal'' - handle for a RapptureUnits Object. [[BR]] 2. character ''retText'' - character array where the whole symbol representing the Rappture Units Object will be stored. [[BR]] Return Value: [[BR]] None [[BR]] Notes: [[BR]] 1. ''retText'' must not be NULL. On successful return, ''retText'' will hold the whole symbol of the Rappture Units Object associated with ''unitRefVal'' [[BR]] {{{ }}} integer '''rp_get_exponent''' (integer ''unitRefVal'', double ''retExponent'') [[BR]] Purpose:[[BR]] Retrieve the exponent portion of the symbol of the Rappture Units Object represented by the handle ''unitRefVal''. [[BR]] Input Arguments: [[BR]] 1. integer ''unitRefVal'' - handle for a RapptureUnits Object. [[BR]] Return Value: [[BR]] Double value representing the exponential portion of the symbol of the Rappture Units Object represented by the handle ''unitRefVal''. [[BR]] Notes: [[BR]] None [[BR]] {{{ }}} integer '''rp_get_basis''' (integer ''unitRefVal'') [[BR]] Purpose:[[BR]] Get the basis for the Rappture Units Object represented by the handle ''unitRefVal''. [[BR]] Input Arguments: [[BR]] 1. integer ''unitRefVal'' - handle for a RapptureUnits Object. [[BR]] Return Value: [[BR]] Integer handle representing the unit just defined. [[BR]] Notes: [[BR]] None [[BR]] {{{ }}} integer '''rp_units_convert_dbl''' (character ''fromVal'', character ''toUnitsName'', double ''convResult'') Purpose:[[BR]] Convert the numeric value and units found in the string ''fromVal'' to the units named in ''toUnitsName''. A double precision value is placed into the variable provided by ''convResult''. An error code is return from the function call, a value of 0 represents success, any other value is failure. [[BR]] Input Arguments: [[BR]] 1. character ''fromVal'' - String representing the numeric value and units you want ot convert from. [[BR]] 2. character ''toUnitsName'' - String representing the name of the units you want to convert to. [[BR]] 3. double ''convResult'' - Holds the conversion result as a double precision value. This value is populated by the function [[BR]] Return Value: [[BR]] On return, the variable ''convResult'' is populated with the conversion result and an error code is returned. An error code of 0 represents success, any other value represents failure. [[BR]] Notes: [[BR]] For this function, units are not displayed in the resultant value ''retText''. [[BR]] {{{ c Example contents of driver.xml file c c c c K c 300K c 300K c c c character*100 strVal, path integer rp_lib, rp_units_convert_dbl integer libHandle, ok double precision T libHandle = rp_lib("driver.xml") path = "input.number(temperature).current" call rp_lib_get(libHandle,path,strVal) ok = rp_units_convert_dbl(strVal,"F",T) print *,T c Result: c T = 80.33F ok = rp_units_convert_dbl("78F","K",T) print *,T c Result: c T = 298.706 }}} integer '''rp_units_convert_str''' (character ''fromVal'', character ''toUnitsName'' character ''retText'') Purpose:[[BR]] Convert the numeric value and units found in the string ''fromVal'' to the units named in ''toUnitsName''. A string value is placed into the variable provided by ''retText''. An error code is return from the function call, a value of 0 represents success, any other value is failure. [[BR]] Input Arguments: [[BR]] 1. character ''fromVal'' - String representing the numeric value and units you want ot convert from. [[BR]] 2. character ''toUnitsName'' - String representing the name of the units you want to convert to. [[BR]] 3. character ''retText'' - Holds the conversion result as a string value. This value is populated by the function [[BR]] Return Value: [[BR]] On return, the variable ''retText'' is populated with the conversion result and an error code is returned. An error code of 0 represents success, any other value represents failure. [[BR]] Notes: [[BR]] Units are always displayed in the return value ''retText''[[BR]] {{{ c Example contents of driver.xml file c c c c K c 300K c 300K c c c character*100 strVal, T integer rp_lib_get, rp_lib, rp_units_convert_str integer libHandle, ok libHandle = rp_lib("driver.xml") call rp_lib_get(libHandle,path,strVal) call rp_lib_get(driver,"input.number(temperature).current", strVal) ok = rp_units_convert_str(strVal,"K",T) print *,T c Result: c T = 80.33F ok = rp_units_convert_str("78F","K",T) print *,T c Result: c T = 298.706 }}}