Acoustic Research Tool (ART)
v0.10
|
The functions and types in this module constitute the top level interface for the Acoustic Research Tool.
Use them to write applications of your own.
Functions | |
__DECLSPEC P_ART_Object __CALLCONV | ARTRootObject () |
Create the ART root object. | |
__DECLSPEC bool __CALLCONV | ARTRootDestroy () |
Destroy the ART root object. | |
__DECLSPEC bool __CALLCONV | ARTSetProgressFunction (TprogressFunction f) |
Define a callback function that is frequently informed about the process of the calculation. | |
__DECLSPEC bool __CALLCONV | ARTCheckPropertyCapability (const char *property, const char *capability) |
Check if a property contains a capability. | |
__DECLSPEC P_ART_Simulator __CALLCONV | ARTCreateSimulator (const char *name, const char *domain, const char *wavetype) |
Use this method to create a simulator. | |
__DECLSPEC bool __CALLCONV | ARTDestroySimulator (P_ART_Simulator simulator) |
Destroys a simulator. | |
__DECLSPEC bool __CALLCONV | ARTSetFrequencyRange (ARTsimulator *sim, double f_min, double f_max, double f_step) |
Set the frequency range of the simulator. | |
__DECLSPEC bool __CALLCONV | ARTSetNModes (ARTsimulator *sim, int Nmodes) |
Sets the number of modes of a simulator. | |
__DECLSPEC P_ART_Element __CALLCONV | ARTFindElement (P_ART_Simulator simulator, const char *name) |
Finds an element with a certain name in the simulator specified. | |
__DECLSPEC P_ART_Circuit __CALLCONV | ARTFindCircuit (P_ART_Simulator simulator, const char *name) |
Finds an circuit with a certain name in the simulator specified. | |
__DECLSPEC P_ART_Element __CALLCONV | ARTCreateElement (P_ART_Simulator simulator, const char *name, const char *type) |
Creates an element of a certain prototype model. | |
__DECLSPEC P_ART_Element __CALLCONV | ARTChangeElementModel (P_ART_Simulator simulator, P_ART_Element element, const char *type) |
Changes the model of an element. | |
__DECLSPEC P_ART_Object __CALLCONV | ARTGetModel (P_ART_Element element) |
Returns the model of an element. | |
__DECLSPEC P_ART_Element __CALLCONV | ARTChangeName (P_ART_Element element, const char *newName) |
Changes the name of an element or circuit. | |
__DECLSPEC bool __CALLCONV | ARTDestroyElement (P_ART_Simulator simulator, P_ART_Element element) |
Destroys an element. | |
__DECLSPEC P_ART_DataProp __CALLCONV | ARTSetParameter (P_ART_Simulator simulator, const char *command) |
Sets the value of parameters. | |
__DECLSPEC P_ART_Circuit __CALLCONV | ARTCreateCircuit (P_ART_Simulator simulator, const char *name) |
Creates an acoustic circuit. | |
__DECLSPEC bool __CALLCONV | ARTDestroyCircuit (P_ART_Simulator simulator, P_ART_Circuit circuit) |
Destroys a circuit. | |
__DECLSPEC P_ART_TModule __CALLCONV | ARTCreateTModule (P_ART_Simulator simulator, const char *name, const char *type) |
Creates a time simulation module. | |
__DECLSPEC bool __CALLCONV | ARTDestroyTModule (P_ART_Simulator simulator, P_ART_TModule module) |
Destroys a time simulation module. | |
__DECLSPEC bool __CALLCONV | ARTAddOPortToTModule (P_ART_TModule module, const char *name, const char *expr) |
Adds a new output port to the given time module. | |
__DECLSPEC bool __CALLCONV | ARTSetOPortOfFModule (P_ART_TModule module, int len, const char *expr) |
Sets the function output port of the given function module. | |
__DECLSPEC bool __CALLCONV | ARTAddLocalParamToTModule (P_ART_TModule module, const char *name, const char *expr) |
Adds a new local parameter to the given time module. | |
__DECLSPEC bool __CALLCONV | ARTAddGlobalParamToTSimulator (P_ART_Simulator simulator, const char *name, const char *expr) |
Adds a new global parameter to the given time simulator. | |
__DECLSPEC bool __CALLCONV | ARTConnectPorts (P_ART_Simulator simulator, const char *expr) |
Connects the ports of the given modules. | |
__DECLSPEC P_ART_DataProp __CALLCONV | ARTGetPortFromTModule (P_ART_TModule module, const char *name) |
Connects the ports of the given modules. | |
__DECLSPEC T_ART_Cmplx __CALLCONV | ARTGetComplexFromPort (P_ART_DataProp port, int idx) |
Calculates the output value of the given port at the specified time index.s. | |
__DECLSPEC int __CALLCONV | ARTGetReferencePosition (P_ART_Circuit circuit, P_ART_Element element) |
Finds the element in the circuit and returns is position. | |
__DECLSPEC P_ART_Object __CALLCONV | ARTAppendReference (P_ART_Circuit circuit, P_ART_Element element) |
Append the reference to an element to the end of a circuit. | |
__DECLSPEC P_ART_Object __CALLCONV | ARTAppendReferenceBefore (P_ART_Circuit circuit, P_ART_Element referenceAfter, P_ART_Element reference) |
Insert the reference to an element before another element into a circuit. | |
__DECLSPEC P_ART_Object __CALLCONV | ARTAppendReferenceAfter (P_ART_Circuit circuit, P_ART_Element referenceBefore, P_ART_Element reference) |
Insert the reference to an element after another element into a circuit. | |
__DECLSPEC int __CALLCONV | ARTRemoveReference (P_ART_Circuit circuit, P_ART_Element reference) |
Remove a reference to an element from a circuit. | |
__DECLSPEC int __CALLCONV | ARTReplaceReference (P_ART_Circuit circuit, P_ART_Element search, P_ART_Element replace) |
Replace a reference to an element with references to another element in a circuit. | |
__DECLSPEC int __CALLCONV | ARTRemoveAllReferences (P_ART_Circuit circuit) |
Remove all references to elements from a circuit. | |
__DECLSPEC P_ART_DataProp __CALLCONV | ARTInputImpedance (P_ART_Circuit circuit) |
Returns the input impedance of a circuit. | |
__DECLSPEC const char *__CALLCONV | ARTGetName (P_ART_Cell pobj) |
Returns the name of an object. | |
__DECLSPEC const char *__CALLCONV | ARTGetShortDescription (P_ART_Cell pobj) |
Returns the short description of an object. | |
__DECLSPEC const char *__CALLCONV | ARTGetLongDescription (P_ART_Cell pobj) |
Returns the long description of an object. | |
__DECLSPEC const char *__CALLCONV | ARTGetHelpFilename (P_ART_Cell pobj) |
Returns the help filename of an object. | |
__DECLSPEC bool __CALLCONV | ARTIsListable (P_ART_Property pprp) |
Returns true if the property is listable. | |
__DECLSPEC P_ART_Variant __CALLCONV | ARTGetRange (P_ART_DataProp pprp) |
Data properties can have a defined range. | |
__DECLSPEC bool __CALLCONV | ARTIsDataProp (P_ART_Property pprp) |
Properties and data properties are saved in the same lists in all objects. | |
__DECLSPEC const char *__CALLCONV | ARTGetDefinitionString (P_ART_DataProp dc) |
Returns the definition string of a data property, in the same format as it is used in the parser and in the function ARTSetParameter (see there for details on the format.) A definition string is also returned if the value of the data property has not been set using ARTSetParameter. | |
__DECLSPEC T_ART_Type __CALLCONV | ARTGetDatatype (P_ART_Variant pprp) |
Returns the datatype of a data property. | |
__DECLSPEC int __CALLCONV | ARTGetLength (P_ART_Variant pprp) |
Returns the length of a data property. | |
__DECLSPEC P_ART_Variant __CALLCONV | ARTGetValue (P_ART_DataProp pprp) |
Returns the value of a data property. | |
__DECLSPEC char *__CALLCONV | ARTGetString (P_ART_Variant pprp, int idx) |
__DECLSPEC bool __CALLCONV | ARTSetString (P_ART_Variant pprp, int idx, const char *s) |
Set the string at index idx of the data property pointed to by pprp to s. | |
__DECLSPEC int __CALLCONV | ARTGetInteger (P_ART_Variant pprp, int idx) |
__DECLSPEC bool __CALLCONV | ARTSetInteger (P_ART_Variant pprp, int idx, int i) |
Set the integer at index idx of the data property pointed to by pprp to i. | |
__DECLSPEC float __CALLCONV | ARTGetFloat (P_ART_Variant pprp, int idx) |
__DECLSPEC bool __CALLCONV | ARTSetFloat (P_ART_Variant pprp, int idx, float f) |
Set the floating point value at index idx of the data property pointed to by pprp to f. | |
__DECLSPEC double __CALLCONV | ARTGetDouble (P_ART_Variant pprp, int idx) |
__DECLSPEC bool __CALLCONV | ARTSetDouble (P_ART_Variant pprp, int idx, double d) |
Set the double value at index idx of the data property pointed to by pprp to d. | |
__DECLSPEC T_ART_Cmplx __CALLCONV | ARTGetComplex (P_ART_Variant pprp, int idx) |
__DECLSPEC bool __CALLCONV | ARTSetComplex (P_ART_Variant pprp, int idx, T_ART_Cmplx c) |
Set the complex value at index idx of the data property pointed to by pprp to c. | |
__DECLSPEC T_ART_Tripl __CALLCONV | ARTGetTriple (P_ART_Variant pprp, int idx) |
__DECLSPEC bool __CALLCONV | ARTSetTriple (P_ART_Variant pprp, int idx, T_ART_Tripl t) |
Set the triple value at index idx of the data property pointed to by pprp to t. | |
__DECLSPEC T_ART_Matrix __CALLCONV | ARTGetMatrix (P_ART_Variant pprp, int idx) |
__DECLSPEC bool __CALLCONV | ARTSetMatrix (P_ART_Variant pprp, int idx, T_ART_Matrix m) |
Set the matrix at index idx of the data property pointed to by pprp to m. | |
__DECLSPEC P_ART_Property __CALLCONV | ARTFindProperty (P_ART_Object host, const char *nam) |
Find a property of an object. | |
__DECLSPEC P_ART_DataProp __CALLCONV | ARTFindDataProperty (P_ART_Object host, const char *nam) |
Find a data property of an object. | |
__DECLSPEC P_ART_Method __CALLCONV | ARTFindMethod (P_ART_Object host, const char *nam) |
Find a method of an object. | |
__DECLSPEC P_ART_Object __CALLCONV | ARTFindObject (P_ART_ListProp host, const char *nam) |
Find an object that is appended to another object. | |
__DECLSPEC P_ART_Property __CALLCONV | ARTGetProperties (P_ART_Object host, P_ART_Property pos) |
Iterates through all properties of the object host (including data properties). | |
__DECLSPEC P_ART_DataProp __CALLCONV | ARTGetDataProperties (P_ART_Object host, P_ART_DataProp pos) |
Iterates through all the data properties of the object host. | |
__DECLSPEC P_ART_Method __CALLCONV | ARTGetMethods (P_ART_Object host, P_ART_Method pos) |
Iterates through all methods of the object host. | |
__DECLSPEC P_ART_Object __CALLCONV | ARTGetObjects (P_ART_ListProp host, P_ART_Object pos) |
Iterates through all objects in the list host. | |
__DECLSPEC P_ART_DataProp __CALLCONV | ARTAppendDataProp (P_ART_Object host, P_ART_Variant val, const char *nam, const char *sds, const char *lds, const char *htm) |
Appends a data property to an ARTobject. | |
__DECLSPEC P_ART_ListProp __CALLCONV | ARTAppendListProp (P_ART_Object host, const char *nam, const char *sds, const char *lds, const char *htm) |
Appends a listable property to an ARTobject. | |
__DECLSPEC P_ART_Method __CALLCONV | ARTAppendMethod (P_ART_Object host, const char *nam, const char *sds, const char *lds, const char *htm) |
Appends a method to an ARTobject. | |
__DECLSPEC P_ART_Object __CALLCONV | ARTAppendObject (P_ART_ListProp host, const char *nam, const char *sds, const char *lds, const char *htm) |
Appends an object to a listable property. | |
__DECLSPEC bool __CALLCONV | ARTDeleteProperty (P_ART_Object host, P_ART_Property prp) |
Deletes the property prp of object host. | |
__DECLSPEC bool __CALLCONV | ARTDeleteMethod (P_ART_Object host, P_ART_Method mtd) |
Deletes the method mtd of object host. | |
__DECLSPEC bool __CALLCONV | ARTDeleteObject (P_ART_ListProp host, P_ART_Object pobj) |
Deletes the object pobj of object host. | |
__DECLSPEC char *__CALLCONV | ARTGetLastErrorMessage () |
Returns the last error message. | |
char *__CALLCONV | ARTGetDependencyTree (P_ART_DataProp pprp, const char *linebreak) |
NEU Returns a string representation of the dependency tree. |
__DECLSPEC bool __CALLCONV ARTAddGlobalParamToTSimulator | ( | P_ART_Simulator | simulator, |
const char * | name, | ||
const char * | expr | ||
) |
Adds a new global parameter to the given time simulator.
simulator | A pointer to the simulator to which the parameter will be added. |
name | Name of the new parameter. |
expr | The calculation expression of the new parameter. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTAddLocalParamToTModule | ( | P_ART_TModule | module, |
const char * | name, | ||
const char * | expr | ||
) |
Adds a new local parameter to the given time module.
module | A pointer to the time module to which the parameter will be added. |
name | Name of the new parameter. |
expr | The calculation expression of the new parameter. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTAddOPortToTModule | ( | P_ART_TModule | module, |
const char * | name, | ||
const char * | expr | ||
) |
Adds a new output port to the given time module.
module | A pointer to the time module to which the port will be added. |
name | Name of the new output port. |
expr | The calculation expression of the new output port. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_DataProp __CALLCONV ARTAppendDataProp | ( | P_ART_Object | host, |
P_ART_Variant | val, | ||
const char * | nam, | ||
const char * | sds, | ||
const char * | lds, | ||
const char * | htm | ||
) |
Appends a data property to an ARTobject.
host | The object the data property should be appended to. |
val | The value of the data property. |
nam | The name of the data property. |
sds | The short description of the data property. |
lds | The long description of the data property. |
htm | Filename of the html description of the data property. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_ListProp __CALLCONV ARTAppendListProp | ( | P_ART_Object | host, |
const char * | nam, | ||
const char * | sds, | ||
const char * | lds, | ||
const char * | htm | ||
) |
Appends a listable property to an ARTobject.
A listable property is an array of properties.
host | The object the listable property should be appended to. |
nam | The name of the listable property. |
sds | The short description of the listable property. |
lds | The long description of the listable property. |
htm | Filename of the html description of the listable property. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Method __CALLCONV ARTAppendMethod | ( | P_ART_Object | host, |
const char * | nam, | ||
const char * | sds, | ||
const char * | lds, | ||
const char * | htm | ||
) |
Appends a method to an ARTobject.
host | The object the method should be appended to. |
nam | The name of the method. |
sds | The short description of the method. |
lds | The long description of the method. |
htm | Filename of the html description of the method. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Object __CALLCONV ARTAppendObject | ( | P_ART_ListProp | host, |
const char * | nam, | ||
const char * | sds, | ||
const char * | lds, | ||
const char * | htm | ||
) |
Appends an object to a listable property.
host | The listable property the object should be appended to. |
nam | The name of the object. |
sds | The short description of the object. |
lds | The long description of the object. |
htm | Filename of the html description of the object. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Object __CALLCONV ARTAppendReference | ( | P_ART_Circuit | circuit, |
P_ART_Element | element | ||
) |
Append the reference to an element to the end of a circuit.
circuit | A pointer to the circuit. |
element | A pointer to an element or circuit to be added to this circuit. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Object __CALLCONV ARTAppendReferenceAfter | ( | P_ART_Circuit | circuit, |
P_ART_Element | referenceBefore, | ||
P_ART_Element | reference | ||
) |
Insert the reference to an element after another element into a circuit.
circuit | A pointer to the circuit. |
referenceBefore | A pointer to the reference after which the element should be inserted. |
reference | A pointer to an element or circuit to be inserted into this circuit. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Object __CALLCONV ARTAppendReferenceBefore | ( | P_ART_Circuit | circuit, |
P_ART_Element | referenceAfter, | ||
P_ART_Element | reference | ||
) |
Insert the reference to an element before another element into a circuit.
circuit | A pointer to the circuit. |
referenceAfter | A pointer to the reference before which the element should be inserted. |
reference | A pointer to an element or circuit to be inserted into this circuit. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Element __CALLCONV ARTChangeElementModel | ( | P_ART_Simulator | simulator, |
P_ART_Element | element, | ||
const char * | type | ||
) |
Changes the model of an element.
simulator | A pointer to the simulator in which the element was created. |
element | A pointer to the element. |
type | The name of the prototype model you want the element to change to. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Element __CALLCONV ARTChangeName | ( | P_ART_Element | element, |
const char * | newName | ||
) |
Changes the name of an element or circuit.
Note that expressions referring to this element like a parameter definition along the lines of "MyEl.R * 2" are not changed. If you changed the name of element "MyEl" to "Cyl", you have to redefine the defenition.
element | A pointer to the element or circuit to be renamed. |
newName | The new name. |
__DECLSPEC bool __CALLCONV ARTCheckPropertyCapability | ( | const char * | property, |
const char * | capability | ||
) |
Check if a property contains a capability.
property | The property checked for the capability. |
capability | A string representing the capability to be checked for. |
ARTerror |
__DECLSPEC bool __CALLCONV ARTConnectPorts | ( | P_ART_Simulator | simulator, |
const char * | expr | ||
) |
Connects the ports of the given modules.
simulator | A pointer to the simulator containing the related time modules. |
expr | The calculation expression of the port connection. Example: "module1.in = module2.out". |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Circuit __CALLCONV ARTCreateCircuit | ( | P_ART_Simulator | simulator, |
const char * | name | ||
) |
Creates an acoustic circuit.
simulator | The simulator within which the circuit should be created. |
name | The name of the circuit. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Element __CALLCONV ARTCreateElement | ( | P_ART_Simulator | simulator, |
const char * | name, | ||
const char * | type | ||
) |
Creates an element of a certain prototype model.
simulator | A pointer to the simulator in which the element should be created. |
name | The name of the new element. |
type | The name of the prototype model. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Simulator __CALLCONV ARTCreateSimulator | ( | const char * | name, |
const char * | domain, | ||
const char * | wavetype | ||
) |
Use this method to create a simulator.
A simulator belongs to a domain of simulation in which waves of one type are calculated. It contains models of acoustic elements and arrangements of such models.
name | The name of the simulator. |
domain | The domain of the simulation. So far only frequency domain simulation is possible, so this value must be "frequency". |
wavetype | The type of the simulated waves. Query the root object for possible values. |
ARTerror |
__DECLSPEC P_ART_TModule __CALLCONV ARTCreateTModule | ( | P_ART_Simulator | simulator, |
const char * | name, | ||
const char * | type | ||
) |
Creates a time simulation module.
simulator | The simulator within which the circuit should be created. |
name | The name of the time module. |
type | The type of the time module. All available types are registered as prototypes in the root object. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTDeleteMethod | ( | P_ART_Object | host, |
P_ART_Method | mtd | ||
) |
Deletes the method mtd of object host.
host | A pointer to an ARTobject. |
mtd | A pointer to the method whose reference should be deleted form the methods of object host. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTDeleteObject | ( | P_ART_ListProp | host, |
P_ART_Object | pobj | ||
) |
Deletes the object pobj of object host.
host | A pointer to an ARTobject. |
pobj | A pointer to the object whose reference should be deleted form the object-list of object host. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTDeleteProperty | ( | P_ART_Object | host, |
P_ART_Property | prp | ||
) |
Deletes the property prp of object host.
host | A pointer to an ARTobject. |
prp | A pointer to the property whose reference should be deleted form the properties of object host. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTDestroyCircuit | ( | P_ART_Simulator | simulator, |
P_ART_Circuit | circuit | ||
) |
Destroys a circuit.
simulator | A pointer to the simulator to which the circuit belongs. |
circuit | A pointer to the circuit to be destroyed. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTDestroyElement | ( | P_ART_Simulator | simulator, |
P_ART_Element | element | ||
) |
Destroys an element.
simulator | A pointer to the simulator to which the element belongs. |
element | A pointer to the element to be destroyed. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTDestroySimulator | ( | P_ART_Simulator | simulator | ) |
Destroys a simulator.
simulator | A pointer to the simulator to be destroyed. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTDestroyTModule | ( | P_ART_Simulator | simulator, |
P_ART_TModule | module | ||
) |
Destroys a time simulation module.
simulator | A pointer to the simulator to which the circuit belongs. |
module | A pointer to the time module to be destroyed. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_DataProp __CALLCONV ARTFindDataProperty | ( | P_ART_Object | host, |
const char * | nam | ||
) |
Find a data property of an object.
host | The object in which the property will be searched. |
nam | The name of the property to be searched. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Method __CALLCONV ARTFindMethod | ( | P_ART_Object | host, |
const char * | nam | ||
) |
Find a method of an object.
host | The object in which the method will be searched. |
nam | The name of the method to be searched. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Object __CALLCONV ARTFindObject | ( | P_ART_ListProp | host, |
const char * | nam | ||
) |
Find an object that is appended to another object.
host | The object in which the appended object will be searched. |
nam | The name of the object which you are looking for. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Property __CALLCONV ARTFindProperty | ( | P_ART_Object | host, |
const char * | nam | ||
) |
Find a property of an object.
host | The object in which the property will be searched. |
nam | The name of the property to be searched. |
ARTerror | if not using the DLL interface. |
__DECLSPEC T_ART_Cmplx __CALLCONV ARTGetComplex | ( | P_ART_Variant | pprp, |
int | idx | ||
) |
pprp | A pointer to a data property. |
idx | The index of the value to be read. If the property is not an array, this parameter may be omitted. |
ARTerror | if not using the DLL interface. |
__DECLSPEC T_ART_Cmplx __CALLCONV ARTGetComplexFromPort | ( | P_ART_DataProp | port, |
int | idx | ||
) |
Calculates the output value of the given port at the specified time index.s.
port | Port object, of which the timing value shall be calculated. |
idx | Time index of the interested value. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_DataProp __CALLCONV ARTGetDataProperties | ( | P_ART_Object | host, |
P_ART_DataProp | pos | ||
) |
Iterates through all the data properties of the object host.
If the object is an element, only properties of the element, but not of the model are enumerated. Use ARTGetModelProperties to get the properties of the model instead.
host | A pointer to an ARTobject |
pos | A pointer to a property. This parameter is not used except for deciding if the iteration should start at the beginning. It is used to allow you to quickly cycle through all properties. Check out the example given in the documentation of ARTGetProperties. |
ARTerror | if not using the DLL interface. |
__DECLSPEC T_ART_Type __CALLCONV ARTGetDatatype | ( | P_ART_Variant | pprp | ) |
Returns the datatype of a data property.
pprp | A pointer to the property whose type should be returned. |
ARTerror | if not using the DLL interface. |
__DECLSPEC const char* __CALLCONV ARTGetDefinitionString | ( | P_ART_DataProp | dc | ) |
Returns the definition string of a data property, in the same format as it is used in the parser and in the function ARTSetParameter (see there for details on the format.) A definition string is also returned if the value of the data property has not been set using ARTSetParameter.
This function does not (yet) work with array types.
dc | A data property whose definition should be retrieved. |
char* __CALLCONV ARTGetDependencyTree | ( | P_ART_DataProp | pprp, |
const char * | linebreak | ||
) |
NEU Returns a string representation of the dependency tree.
This function is for debugging only and might be removed in the future.
__DECLSPEC double __CALLCONV ARTGetDouble | ( | P_ART_Variant | pprp, |
int | idx | ||
) |
pprp | A pointer to a data property. |
idx | The index of the value to be read. If the property is not an array, this parameter may be omitted. |
ARTerror | if not using the DLL interface. |
__DECLSPEC float __CALLCONV ARTGetFloat | ( | P_ART_Variant | pprp, |
int | idx | ||
) |
pprp | A pointer to a data property. |
idx | The index of the value to be read. If the property is not an array, this parameter may be omitted. |
ARTerror | if not using the DLL interface. |
__DECLSPEC const char* __CALLCONV ARTGetHelpFilename | ( | P_ART_Cell | pobj | ) |
Returns the help filename of an object.
pobj | A pointer to the object whose help filename should be returned. |
ARTerror | if not using the DLL interface. |
__DECLSPEC int __CALLCONV ARTGetInteger | ( | P_ART_Variant | pprp, |
int | idx | ||
) |
pprp | A pointer to a data property. |
idx | The index of the value to be read. If the property is not an array, this parameter may be omitted. |
ARTerror | if not using the DLL interface. |
__DECLSPEC char* __CALLCONV ARTGetLastErrorMessage | ( | ) |
Returns the last error message.
Use this function only when you are using the DLL interface, otherwise this function will always return an empty string. When using the header files and programming in C++, catch exceptions of type ARTerror to handle errors. Once an error message has been queried, this function returns an empty string.
__DECLSPEC int __CALLCONV ARTGetLength | ( | P_ART_Variant | pprp | ) |
Returns the length of a data property.
pprp | A pointer to the property whose length should be returned. |
ARTerror | if not using the DLL interface. |
__DECLSPEC const char* __CALLCONV ARTGetLongDescription | ( | P_ART_Cell | pobj | ) |
Returns the long description of an object.
pobj | A pointer to the object whose long description should be returned. |
ARTerror | if not using the DLL interface. |
__DECLSPEC T_ART_Matrix __CALLCONV ARTGetMatrix | ( | P_ART_Variant | pprp, |
int | idx | ||
) |
pprp | A pointer to a data property. |
idx | The index of the value to be read. If the property is not an array, this parameter may be omitted. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Method __CALLCONV ARTGetMethods | ( | P_ART_Object | host, |
P_ART_Method | pos | ||
) |
Iterates through all methods of the object host.
host | A pointer to an ARTobject |
pos | A pointer to a method. This parameter is not used except for deciding if the iteration should start at the beginning. It is used to allow you to quickly cycle through all methods. Check out the example given in the documentation of ARTGetProperties. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Object __CALLCONV ARTGetModel | ( | P_ART_Element | element | ) |
Returns the model of an element.
Use this function when you want to get information about an element's model to get a pointer to the model which you can pass on to other functions like ARTGetDataProperties.
element | A pointer to the element whose model should be retrieved. |
__DECLSPEC const char* __CALLCONV ARTGetName | ( | P_ART_Cell | pobj | ) |
Returns the name of an object.
pobj | A pointer to the object whose name should be returned. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Object __CALLCONV ARTGetObjects | ( | P_ART_ListProp | host, |
P_ART_Object | pos | ||
) |
Iterates through all objects in the list host.
host | A pointer to a list property. |
pos | A pointer to an object. This parameter is not used except for deciding if the iteration should start at the beginning. It is used to allow you to quickly cycle through all objects. Check out the example given in the documentation of ARTGetProperties. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_DataProp __CALLCONV ARTGetPortFromTModule | ( | P_ART_TModule | module, |
const char * | name | ||
) |
Connects the ports of the given modules.
module | A pointer to the time module containing the specified port. |
name | The name of the port. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Property __CALLCONV ARTGetProperties | ( | P_ART_Object | host, |
P_ART_Property | pos | ||
) |
Iterates through all properties of the object host (including data properties).
To find out if a property is a data property use ARTIsDataProp. If the object is an element only properties of the element itself, but not of the model of the element are enumerated. Use ARTGetModel to get a pointer to the model and pass this pointer to this function to get the properties of the model instead.
host | A pointer to an ARTobject |
pos | A pointer to a property. This parameter is not used except for deciding if the iteration should start at the beginning. It is used to allow you to quickly cycle through all properties. Check out this example: P_ART_Property prop = NULL;
while ( prop = ARTGetProperties(mySim, prop) )
{
// Do some processing with prop
}
|
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Variant __CALLCONV ARTGetRange | ( | P_ART_DataProp | pprp | ) |
Data properties can have a defined range.
This function returns a pointer to an ARTvariant structure if a range for the data property is defined. Ranges are of one of the array types. Numerical ranges are defined by a minimum value at index 0 and a maximum value at index 1. The user has to ensure that the value of the data property does not violate this bounds otherwise errors will be generated when processing the data container (but not when setting the value!). For string types, the range data structure contains a list of possible strings if the set of values is restricted.
pprp | The data property whose range should be recieved. |
__DECLSPEC int __CALLCONV ARTGetReferencePosition | ( | P_ART_Circuit | circuit, |
P_ART_Element | element | ||
) |
Finds the element in the circuit and returns is position.
The first element (nearest to mouth piece) of the circuit is at position 0.
circuit | A pointer to the circuit. |
element | Pointer to the element whose position is queried. |
ARTerror | if not using the DLL interface |
__DECLSPEC const char* __CALLCONV ARTGetShortDescription | ( | P_ART_Cell | pobj | ) |
Returns the short description of an object.
pobj | A pointer to the object whose short description should be returned. |
ARTerror | if not using the DLL interface. |
__DECLSPEC char* __CALLCONV ARTGetString | ( | P_ART_Variant | pprp, |
int | idx | ||
) |
pprp | A pointer to a data property. |
idx | The index of the string to be read. If the property is not an array, this parameter may be omitted. |
ARTerror | if not using the DLL interface. |
__DECLSPEC T_ART_Tripl __CALLCONV ARTGetTriple | ( | P_ART_Variant | pprp, |
int | idx | ||
) |
pprp | A pointer to a data property. |
idx | The index of the value to be read. If the property is not an array, this parameter may be omitted. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_Variant __CALLCONV ARTGetValue | ( | P_ART_DataProp | pprp | ) |
Returns the value of a data property.
pprp | A pointer to the property whose value should be returned. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_DataProp __CALLCONV ARTInputImpedance | ( | P_ART_Circuit | circuit | ) |
Returns the input impedance of a circuit.
The impedance is evaluated as the circuit is at the moment of the function call. If the circuit is changed the function has to be called again to recalculate the impedance. Note that the value returned is a pointer to a property of the circuit. That means if you evaluate the impedance, store the pointer in a variable and then reevaluate the impedance after changing the circuit, the old pointer you have stored will point to the same data as the new pointer. If you need to compare impedances of the same circuit, you must make copies.
circuit | A pointer to the circuit whose input impedance should be returned. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTIsDataProp | ( | P_ART_Property | pprp | ) |
Properties and data properties are saved in the same lists in all objects.
When you are not sure if a property retrieved is a data property or not, use this function to find out.
pprp | The property to be examined. |
__DECLSPEC bool __CALLCONV ARTIsListable | ( | P_ART_Property | pprp | ) |
Returns true if the property is listable.
If the property given is NULL, false is returned.
pprp | A pointer to the property |
ARTerror | if not using the DLL interface. |
__DECLSPEC int __CALLCONV ARTRemoveAllReferences | ( | P_ART_Circuit | circuit | ) |
Remove all references to elements from a circuit.
circuit | A pointer to the circuit. |
ARTerror | if not using the DLL interface. |
__DECLSPEC int __CALLCONV ARTRemoveReference | ( | P_ART_Circuit | circuit, |
P_ART_Element | reference | ||
) |
Remove a reference to an element from a circuit.
circuit | A pointer to the circuit. |
reference | Pointer to the reference to be removed. |
ARTerror | if not using the DLL interface. |
__DECLSPEC int __CALLCONV ARTReplaceReference | ( | P_ART_Circuit | circuit, |
P_ART_Element | search, | ||
P_ART_Element | replace | ||
) |
Replace a reference to an element with references to another element in a circuit.
circuit | A pointer to the circuit. |
search | Pointer to the reference to be replaced. |
replace | Pointer to the reference to replace search. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTRootDestroy | ( | ) |
Destroy the ART root object.
Call this function before exiting your programme to clean up memory.
__DECLSPEC P_ART_Object __CALLCONV ARTRootObject | ( | ) |
Create the ART root object.
This object contains all prototypes, simulators, methods and objects. It is created automatically in most functions and a pointer is stored internally. Do not call this method yourself.
__DECLSPEC bool __CALLCONV ARTSetComplex | ( | P_ART_Variant | pprp, |
int | idx, | ||
T_ART_Cmplx | c | ||
) |
Set the complex value at index idx of the data property pointed to by pprp to c.
pprp | A pointer to a data property. |
idx | The index of the complex value to be written. If the property is not an array, this parameter may be omitted. |
c | The complex value to be written. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTSetDouble | ( | P_ART_Variant | pprp, |
int | idx, | ||
double | d | ||
) |
Set the double value at index idx of the data property pointed to by pprp to d.
pprp | A pointer to a data property. |
idx | The index of the value to be written. If the property is not an array, this parameter may be omitted. |
d | The value to be written. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTSetFloat | ( | P_ART_Variant | pprp, |
int | idx, | ||
float | f | ||
) |
Set the floating point value at index idx of the data property pointed to by pprp to f.
pprp | A pointer to a data property. |
idx | The index of the value to be written. If the property is not an array, this parameter may be omitted. |
f | The value to be written. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTSetFrequencyRange | ( | ARTsimulator * | sim, |
double | f_min, | ||
double | f_max, | ||
double | f_step | ||
) |
Set the frequency range of the simulator.
sim | The simulator whose frequency should be set. |
f_min | The lower frequency limit in Hz. |
f_max | The higher frequency limit in Hz. |
f_step | The frequency resolution used in the frequency range, in Hz. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTSetInteger | ( | P_ART_Variant | pprp, |
int | idx, | ||
int | i | ||
) |
Set the integer at index idx of the data property pointed to by pprp to i.
pprp | A pointer to a data property. |
idx | The index of the value to be written. If the property is not an array, this parameter may be omitted. |
i | The value to be written. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTSetMatrix | ( | P_ART_Variant | pprp, |
int | idx, | ||
T_ART_Matrix | m | ||
) |
Set the matrix at index idx of the data property pointed to by pprp to m.
pprp | A pointer to a data property. |
idx | The index of the matrix to be written. If the property is not an array, this parameter may be omitted. |
m | The value to be written. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTSetNModes | ( | ARTsimulator * | sim, |
int | Nmodes | ||
) |
Sets the number of modes of a simulator.
sim | The simulator whose number of modes should be set. |
Nmodes | The number of modes. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTSetOPortOfFModule | ( | P_ART_TModule | module, |
int | len, | ||
const char * | expr | ||
) |
Sets the function output port of the given function module.
module | A pointer to the time module of which the port will be defined. |
len | Length of the output port. |
expr | The calculation expression of the output port, may be empty if values are initialized manually. |
ARTerror | if not using the DLL interface. |
__DECLSPEC P_ART_DataProp __CALLCONV ARTSetParameter | ( | P_ART_Simulator | simulator, |
const char * | command | ||
) |
Sets the value of parameters.
simulator | The simulator to which the parameters or their models belong. |
command | A list of commands to set the values of parameters. If more than one command, the commands must be seperated by semicolons. A data property P of a model of an element E can always be refered to by "E.P". To change the radius of the model of the element "MyCylinder" to 12 cm, write: MyCylinder.R = 12 You can also use other properties to define one property, for example: ThyCylinder.R = MyCylinder.R * 2 Properties of the simulator can be accessed directly. To set the number of modes, write: NumberOfModes = 32 Some errors like circular references will only be detected when evaluating the property. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTSetProgressFunction | ( | TprogressFunction | f | ) |
Define a callback function that is frequently informed about the process of the calculation.
f | A pointer to the callback function. The function must be of type TprogressFunction. A floating point number of type double is passed to the callback function. The number indicates the progress of the current calculation. 0 means no progress, 1 means complete. If the return value of the callback function is true, the calculation is continued, otherwise it is aborted by throwing an ARTabort exception, which must be catched by the user. |
__DECLSPEC bool __CALLCONV ARTSetString | ( | P_ART_Variant | pprp, |
int | idx, | ||
const char * | s | ||
) |
Set the string at index idx of the data property pointed to by pprp to s.
If the property is NULL nothing is done. If the type of the data property is not C_ART_str or C_ART_nstr nothing is done. If the index is out of bounds, nothing is done.
pprp | A pointer to a data property. |
idx | The index of the string to be written. If the property is not an array, this parameter may be omitted. |
s | The string to be written. |
ARTerror | if not using the DLL interface. |
__DECLSPEC bool __CALLCONV ARTSetTriple | ( | P_ART_Variant | pprp, |
int | idx, | ||
T_ART_Tripl | t | ||
) |
Set the triple value at index idx of the data property pointed to by pprp to t.
pprp | A pointer to a data property. |
idx | The index of the triple value to be written. If the property is not an array, this parameter may be omitted. |
t | The value to be written. |
ARTerror | if not using the DLL interface. |