svc_phidget properties

The Phidget extension allows you to map Phidgets sensors, motors and interfaces to fields.

phidget.spec

The property used by svc_phidget to find the phidgets.

<!-- PhidgetInterfaceKit -->
  <service name="Rotary" 
    provision="phidget">
    <prop name="phidget.spec" 
      kind="PhidgetInterfaceKit" 
      domains="domain.local"/>
    <prop name="phidget.params" 
      sensor0="position"/>
   </service>

<!-- PhidgetAdvancedServo -->
   <service name="Servo" 
     provision="phidget">
     <prop name="phidget.spec" 
       kind="PhidgetAdvancedServo" 
       domains="domain.local"/>
     <prop name="phidget.params" 
       position0="position"/>
   </service>

<!-- PhidgetRFID -->
  <service name="myService" 
    provision="phidget">
    <prop name="phidget.spec" 
      kind="PhidgetRFID" 
      domains="domain.local"/>
    <prop name="phidget.params" 
      rfid="employee_ID"/>
  </service>

domains

These are the domains in which svc_phidget looks for the phidget. Name any domain specified for svc_phidget in sys.config. If more than one phidgets of the same kind are connected, specify a different domain for the similar phidgets.

phidget.params

The property used to parameterise fields existing on a mix and map them to phidget-specific interfaces. The parameters possible are different for each kind of phidget.

<!-- PhidgetInterfaceKit -->
  <service name="Rotary" 
    provision="phidget">
    <prop name="phidget.spec" 
      kind="PhidgetInterfaceKit" 
      domains="domain.local"/>
    <prop name="phidget.params" 
      sensor0="position"/>
   </service>

<!-- PhidgetAdvancedServo -->
   <service name="Servo" 
     provision="phidget">
     <prop name="phidget.spec" 
       kind="PhidgetAdvancedServo" 
       domains="domain.local"/>
     <prop name="phidget.params" 
       position0="position"/>
   </service>

<!-- PhidgetRFID -->
  <service name="myService" 
    provision="phidget">
    <prop name="phidget.spec" 
      kind="PhidgetRFID" 
      domains="domain.local"/>
    <prop name="phidget.params" 
      rfid="employee_ID"/>
  </service>

PhidgetInterfaceKit parameters

A PhidgetInterfaceKit service can have one or more of the following parameters, based on the number and type of sensors or devices attached to the interface.

Table 2. Parameter values
Parameter Description
sensor0 - sensorN Maps a field of type integer to a sensor slot.
input0 - inputN Maps a field of type boolean to an input slot.
output0 - outputN Maps a field of type boolean to an output slot.

PhidgetAdvancedServo parameters

A PhidgetAdvancedServo service can have one or more of the following parameters, based on the number of motors connected to the motor controller.

Table 3. Parameter values
Parameter Description
position0 - positionN Maps a field of type integer to a motor connection slot.

PhidgetRFID parameters

A PhidgetRFID service can have one or more of the following parameters.

Table 4. Parameter values
Parameter Description
rfid Maps a field of type string to the stored RFID string.
output0 - output1 Maps a field of type boolean to an output slot.
led Maps a field of type boolean to the PhidgetRFID's LED output.