acpGarcia classIndex

Object Description:

Note:

Only one acpGarcia object should be created for each Garcia appplication.  This object manages the communication with the robot and runs the APIView web interface.  Applications that use this object should not be run simultaneously.

Constructors

acpGarcia();
This is the basic default constructor for the main Garcia API object, the acpGarcia object.

Destructors

~acpGarcia();

Methods

virtual int numSubObjects() const;

virtual void enumSubObjects(aObjectEnumProc enumProc,
void* vpRef,
const char* pClassNameFilter = NULL) const;

virtual acpObject* getSubObject(const char* pClassName,
const char* pName) const;

virtual acpObject* getSubObject(const int nObjectIndex) const;

virtual int numProperties() const;

virtual void enumProperties(propertyEnumProc enumProc,
void* vpRef) const;

virtual int getPropertyIndex(const char* pPropertyName) const;

virtual char* getPropertyName(const int nPropertyIndex) const;

virtual aPROPERTY_FLAGS getPropertyFlags(const int nPropertyIndex) const;

virtual acpValue* getValue(const int nPropIndex);

virtual acpValue* getNamedValue(const char* pPropName);

virtual void setValue(const int nPropIndex,
const acpValue* pValue);

virtual void setNamedValue(const char* pPropName,
const acpValue* pValue);

virtual acpObject* createNamedBehavior(const char* pPrimitiveName,
const char* pBehaviorName);

virtual acpObject* createBehavior(const int nPrimitiveIndex,
const char* pBehaviorName);

virtual void queueBehavior(acpObject* pBehavior);

virtual void flushQueuedBehaviors();

virtual int handleCallbacks(const unsigned long nMSYield = 0);

virtual char* statusString(const short nStatus,
char* pText,
unsigned int nMaxChars);

Method Details

virtual int numSubObjects() const;

Return Value:

    The number of subobjects associated with an acpGarcia object.

Description:

    This method returns the number of subobjects associated with an acpGarcia object.  This number may change depending on the hardware options.

virtual void enumSubObjects(aObjectEnumProc enumProc,
void* vpRef,
const char* pClassNameFilter = NULL) const;

Parameters:

Description:

    This method enumerates the subobjects available to the Garcia user.  The user must implement an enumProc routine in order to use this function.  When the pClassNameFilter is not null the routine will only enumerate the objects of the specified class.

virtual acpObject* getSubObject(const char* pClassName,
const char* pName) const;

Parameters:

    pClassName - Class name for the object being retrieved.
    pName - Name of the object being retrieved.

Return Value:

    Description:

      This method retrieves a subobject given its class name and object name.  Two names are required to retrieve an object since two objects with different class names may have the same object name.

    virtual acpObject* getSubObject(const int nObjectIndex) const;

    Parameters:

    Return Value:

      Description:

        This method retrieves a subobject given its index.  Each subobject has a unique index.

      virtual int numProperties() const;

      Return Value:

        The number of properties associated with an acpGarcia object.

      Description:

        This method returns the number of properties associated with an acpGarcia object.

      virtual void enumProperties(propertyEnumProc enumProc,
      void* vpRef) const;

      Parameters:

        enumProc - An enumeration procedure.
        vpRef - A void pointer.

      Description:

        This method enumerates the properties available to the Garcia user.  The user must implement an enumProc routine in order to use this function.

      virtual int getPropertyIndex(const char* pPropertyName) const;

      Parameters:

        pPropertyName - Name of the property whose index is to be retrieved.

      Return Value:

        Description:

          This method retrieves the index of a property given its name.  If the property does not exist in the acpGarcia object, the function returns a value of -1.

        virtual char* getPropertyName(const int nPropertyIndex) const;

        Parameters:

          nPropertyIndex - Index of the property whose name is to be retrieved.

        Return Value:

          Description:

            This method retrieves the name of a property given its index.

          virtual aPROPERTY_FLAGS getPropertyFlags(const int nPropertyIndex) const;

          Parameters:

            nPropertyIndex - Index of the property whose flags are to be retrieved.

          Return Value:

            Description:

              This method retrieves the flags of a property given its index.

            virtual acpValue* getValue(const int nPropIndex);

            Parameters:

              nPropIndex - The index of the property being retrieved.

            Return Value:

              Pointer to the acpValue object with the value of the property.

            Description:

              This method attempts to retreive an acpValue object with the value of the indexed property.  If the property does not exist in the acpGarcia object, the function returns a NULL pointer.

            virtual acpValue* getNamedValue(const char* pPropName);

            Parameters:

              pPropName - A pointer to the name of the property being retrieved.

            Return Value:

              Pointer to the acpValue object with the value of the property.

            Description:

              This method attempts to retreive an acpValue object with the value of the named property.  If the property does not exist in the acpGarcia object, the function returns a NULL pointer.

            virtual void setValue(const int nPropIndex,
            const acpValue* pValue);

            Parameters:

              nPropIndex - The index of the property being set.
              pValue - Pointer to the acpValue object with the new value for the property.

            Description:

              This method attempts to set the indexed property.  If the property does not exist in the acpGarcia object, the subroutine has no effect.

            virtual void setNamedValue(const char* pPropName,
            const acpValue* pValue);

            Parameters:

              pPropName - A pointer to the name of the property being set.
              pValue - Pointer to the acpValue object with the new value for the property.

            Description:

              This method attempts to set the named property.  If the property does not exist in the acpGarcia object, the subroutine has no effect.

            virtual acpObject* createNamedBehavior(const char* pPrimitiveName,
            const char* pBehaviorName);

            Parameters:

            Return Value:

              An opaque reference to the behavior created or NULL if there was an error.

            Description:


            virtual acpObject* createBehavior(const int nPrimitiveIndex,
            const char* pBehaviorName);

            Parameters:

            Return Value:

              An opaque reference to the behavior created or NULL if there was an error.

            Description:


            virtual void queueBehavior(acpObject* pBehavior);

            Parameters:

            Description:


            virtual void flushQueuedBehaviors();

            Description:


            virtual int handleCallbacks(const unsigned long nMSYield = 0);

            Parameters:

            Return Value:

              True if the robot has successfully handled a callback.

            Description:

              This method executes a delay during which the Garcia object will handle its internal IO messages.

            virtual char* statusString(const short nStatus,
            char* pText,
            unsigned int nMaxChars);

            Parameters:

            Return Value:

              Status message string.

            Description:

              Formats a status message.

            version: 1.0, build n.a.
            © Copyright 1994-2012 Acroname, Inc., Boulder, Colorado.  All rights reserved.