Skip to main content
Open topic with navigation CAPL Functions » ISO11783 » ISO11783 Interaction Layer » Iso11783IL_PDDOnDataChanged

Iso11783IL_PDDOnDataChanged (Callback)

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

void Iso11783IL_PDDOnDataChanged( dword ddi, dword elNum, double value );

Description

This function can be implemented in the CAPL program. The function is called up by the interaction layer if a process variable has been changed with a value command via the CAN Bus.

Parameters

  • ddi: data dictionary identifier of the changed process variables
  • elementNumber: element number of the changed process variables
  • value: new value of the process variables

Return Values

Example

void Iso11783IL_PDDOnDataChanged( dword ddi, dword elNum, double value ){
  switch( ddi) {
    case 0x200:
      switch(elNum) {
        case 2:
          // set values of sections
          Iso11783IL_PDDSetValue( Sprayer, 0x200. 3, value );
          Iso11783IL_PDDSetValue( Sprayer, 0x200. 4, value );
          Iso11783IL_PDDSetValue( Sprayer, 0x200. 5, value );
          gOutputPerArea[0] = value;
          gOutputPerArea[1] = value;
          gOutputPerArea[2] = value;
          break;
        case 3:
          gOutputPerArea[0] = value;
          break;
        case 4:
          gOutputPerArea[1] = value;
          break;
        case 5:
          gOutputPerArea[2] = value;
          break;
      }
      break;
    case 0x402: // volume count
      switch(elNum) {
        case 1:
          gVolumeCount = value;
          break;
      }
      break;
  }
}