Recherche Google
ModalysAccesses > Get Access Info
page précédentepage suivante

Get Access Information

Description

Get information about an access using the standard (get-info ... ) function.

(get-info ... )

Lisp Syntax and Default Values

The generic (get-info ... ) function can be used to obtain access-specific information using the following Lisp syntax:

(get-info data_type access_reference)

Parameters

The (get-info ... ) function requires the following two arguments to get information about an access:

  • data_type: a string defining the type of data to request.
  • access_reference: an access on an object.
Controllers

The following types of access-specific data can be requested using the standard (get-info ...) function:

  • 'speed
  • 'position
  • 'force
  • 'admittance

Note that the access must have a connection connected to it in order to obtain the connection force value!

Examples of using the above are:

(get-info 'speed foo-acc)

(get-info 'position foo-acc)

(get-info 'force foo-acc) ; must have a connection connected to it!

(get-info 'admittance foo-acc) ; inverse impedance

Although there already exist built-in functions to get much of this information and output it as a Modalys controller, you could also use a 'foreign-call controller to do much the same thing:

(make-controller 'foreign-call 1 0

         (lambda (ins outs)

                  (vset outs 0 (get-info 'speed access-ref)))

         '())

However, obtaining the access speed this way is much more computationally expensive. Nonetheless, it is the only way, for the moment, to make a controller from the access admittance (i.e. inverse impedance) data.

Options

There are no special options for this function.

page précédentepage suivante
A propos...©IRCAM 2014Réalisé avec Scenari