Writing your own program 149
Table 21 Functions available to lookup programs in the attripc DLL library
Function | Description |
|
|
GetAttribute | Should be called sometime after GetNextLookup. Takes an |
| attribute name as an argument. Returns the currently |
| assigned value of that attribute for the current device as a |
| string. Returns an empty string if the specified attribute is not |
| assigned. |
SetAttribute | Should be called sometime after GetNextLookup. Takes an |
| attribute name and an attribute value as arguments. Assigns |
| the specified attribute value for the current device. |
IsAttributeSet | Should be called sometime after GetNextLookup. Takes an |
| attribute name as an argument. Returns an integer/Boolean. |
| Returns 1/True if the named attribute is currently assigned for |
| the current device and 0/False if the named attribute is not |
| currently assigned for the current device. |
LogError, | These functions take a string as an argument. The string is |
LogInfo | logged to the Traffix Manager Event List directory, such that it |
| can be viewed in the Traffix Manager Event List. LogError logs |
| an error message, while LogInfo logs a normal informational |
| message. |
|
|
Other points to note about
■If your program exits prematurely, for example, it crashes, then the Traffix Service stops. Therefore you must ensure that your program is reliable.
■Your program must startup within 30 seconds. This means that your program must call GetNextLookup within 30 seconds. If 30 seconds is not long enough for your program, then you can control this
■Your program must complete the lookup of attributes for a device within 30 seconds. After 30 seconds any attribute values your program assigns are ignored. Note that this
Testing Attribute If you want to test your attribute lookup program or test a data file for Lookup Programs one of the standard attribute lookup programs before adding it to the
utility provided which allows you to do this. This utility can only test