

LIN_description_file;
LIN_protocol_version = "2.1";
LIN_language_version = "2.1";
LIN_speed = 19.2 kbps;

Nodes {
  Master: Master_Node, 5 ms, 0.5 ms ;
  Slaves: ALM_Node ;
}

Signals {
    AmbLightColourRed:8,0x00,Master_Node,ALM_Node;
    AmbLightColourGreen:8,0x00,Master_Node,ALM_Node;
    AmbLightColourBlue:8,0x00,Master_Node,ALM_Node;
    AmbLightIntensity:8,0x00,Master_Node,ALM_Node;
    AmbLightUpdate:2,0x0,Master_Node,ALM_Node;
    AmbLightMode:6,0x0,Master_Node,ALM_Node;
    AmbLightDuration:8,0x00,Master_Node,ALM_Node;
    AmbLightLIDFrom:8,0x00,Master_Node,ALM_Node;
    AmbLightLIDTo:8,0x00,Master_Node,ALM_Node;
    ALMNVMStatus:4,0x0,ALM_Node,Master_Node;
    ALMThermalStatus:4,0x0,ALM_Node,Master_Node;
    ALMNadNo:8,0x00,ALM_Node,Master_Node;
    SigCommErr:1,0x0,ALM_Node,Master_Node;
    ALMVoltageStatus:4,0x0,ALM_Node,Master_Node;
    ALMLEDState:2,0x0,ALM_Node,Master_Node;
  ColorConfigFrameRed_X: 16, 5665, Master_Node, ALM_Node ;
  ColorConfigFrameRed_Y: 16, 2396, Master_Node, ALM_Node ;
  ColorConfigFrameRed_Z: 16, 0, Master_Node, ALM_Node ;
  ColorConfigFrameGreen_X: 16, 1094, Master_Node, ALM_Node ;
  ColorConfigFrameGreen_Y: 16, 5534, Master_Node, ALM_Node ;
  ColorConfigFrameGreen_Z: 16, 996, Master_Node, ALM_Node ;
  ColorConfigFrameBlue_X: 16, 9618, Master_Node, ALM_Node ;
  ColorConfigFrameBlue_Y: 16, 0, Master_Node, ALM_Node ;
  ColorConfigFrameBlue_Z: 16, 51922, Master_Node, ALM_Node ;
  PWM_Frame_Red: 16, 0, ALM_Node, Master_Node ;
  PWM_Frame_Green: 16, 0, ALM_Node, Master_Node ;
  PWM_Frame_Blue1: 16, 0, ALM_Node, Master_Node ;
  ConfigFrame_Calibration: 1, 0, Master_Node, ALM_Node ;
  PWM_Frame_Blue2: 16, 0, ALM_Node, Master_Node ;
  ColorConfigFrameRed_Vf_Cal: 16, 2031, Master_Node, ALM_Node ;
  ColorConfigFrameGreen_VfCal: 16, 2903, Master_Node, ALM_Node ;
  ColorConfigFrameBlue_VfCal: 16, 2950, Master_Node, ALM_Node ;
  VF_Frame_Red_VF: 16, 0, ALM_Node, Master_Node ;
  VF_Frame_Green_VF: 16, 0, ALM_Node, Master_Node ;
  VF_Frame_Blue1_VF: 16, 0, ALM_Node, Master_Node ;
  VF_Frame_VLED: 16, 0, ALM_Node, Master_Node ;
  VF_Frame_VS: 16, 0, ALM_Node, Master_Node ;
  Tj_Frame_Red: 16, 0, ALM_Node, Master_Node ;
  Tj_Frame_Green: 16, 0, ALM_Node, Master_Node ;
  Tj_Frame_Blue: 16, 0, ALM_Node, Master_Node ;
  ConfigFrame_MaxLM: 16, 3840, Master_Node, ALM_Node ;
  Calibration_status: 1, 0, ALM_Node, Master_Node ;
  Tj_Frame_NTC: 15, 0, ALM_Node, Master_Node ;
  PWM_wo_Comp_Red: 16, 0, ALM_Node, Master_Node ;
  PWM_wo_Comp_Green: 16, 0, ALM_Node, Master_Node ;
  PWM_wo_Comp_Blue: 16, 0, ALM_Node, Master_Node ;
  NVM_Static_Valid: 16, 0, ALM_Node, Master_Node ;
  NVM_Static_Rev: 16, 0, ALM_Node, Master_Node ;
  NVM_Calib_Version: 8, 0, ALM_Node, Master_Node ;
  NVM_OADCCAL: 8, 0, ALM_Node, Master_Node ;
  NVM_GainADCLowCal: 8, 0, ALM_Node, Master_Node ;
  NVM_GainADCHighCal: 8, 0, ALM_Node, Master_Node ;
  ConfigFrame_EnableDerating: 1, 1, Master_Node, ALM_Node ;
  ConfigFrame_EnableCompensation: 1, 1, Master_Node, ALM_Node ;
}

Diagnostic_signals {
  MasterReqB0: 8, 0 ;
  MasterReqB1: 8, 0 ;
  MasterReqB2: 8, 0 ;
  MasterReqB3: 8, 0 ;
  MasterReqB4: 8, 0 ;
  MasterReqB5: 8, 0 ;
  MasterReqB6: 8, 0 ;
  MasterReqB7: 8, 0 ;
  SlaveRespB0: 8, 0 ;
  SlaveRespB1: 8, 0 ;
  SlaveRespB2: 8, 0 ;
  SlaveRespB3: 8, 0 ;
  SlaveRespB4: 8, 0 ;
  SlaveRespB5: 8, 0 ;
  SlaveRespB6: 8, 0 ;
  SlaveRespB7: 8, 0 ;
}



Frames {
    ALM_Req_A:0x0A,Master_Node,8{
        AmbLightColourRed,0;
        AmbLightColourGreen,8;
        AmbLightColourBlue,16;
        AmbLightIntensity,24;
        AmbLightUpdate,32;
        AmbLightMode,34;
        AmbLightDuration,40;
        AmbLightLIDFrom,48;
        AmbLightLIDTo,56;
    }
    ALM_Status:0x11,ALM_Node,4{
        ALMNVMStatus,16;
        SigCommErr,24;
        ALMLEDState,20;
        ALMVoltageStatus,8;
        ALMNadNo,0;
        ALMThermalStatus,12;
    }
  ColorConfigFrameRed: 3, Master_Node, 8 {
    ColorConfigFrameRed_X, 0 ;
    ColorConfigFrameRed_Y, 16 ;
    ColorConfigFrameRed_Z, 32 ;
    ColorConfigFrameRed_Vf_Cal, 48 ;
  }
  ColorConfigFrameGreen: 4, Master_Node, 8 {
    ColorConfigFrameGreen_X, 0 ;
    ColorConfigFrameGreen_Y, 16 ;
    ColorConfigFrameGreen_Z, 32 ;
    ColorConfigFrameGreen_VfCal, 48 ;
  }
  ColorConfigFrameBlue: 5, Master_Node, 8 {
    ColorConfigFrameBlue_X, 0 ;
    ColorConfigFrameBlue_Y, 16 ;
    ColorConfigFrameBlue_Z, 32 ;
    ColorConfigFrameBlue_VfCal, 48 ;
  }
  PWM_Frame: 18, ALM_Node, 8 {
    PWM_Frame_Red, 0 ;
    PWM_Frame_Green, 16 ;
    PWM_Frame_Blue1, 32 ;
    PWM_Frame_Blue2, 48 ;
  }
  ConfigFrame: 6, Master_Node, 3 {
    ConfigFrame_Calibration, 0 ;
    ConfigFrame_MaxLM, 3 ;
    ConfigFrame_EnableDerating, 1 ;
    ConfigFrame_EnableCompensation, 2 ;
  }
  VF_Frame: 19, ALM_Node, 8 {
    VF_Frame_Red_VF, 0 ;
    VF_Frame_Green_VF, 16 ;
    VF_Frame_Blue1_VF, 32 ;
    VF_Frame_VLED, 48 ;
  }
  Tj_Frame: 20, ALM_Node, 8 {
    Tj_Frame_Red, 0 ;
    Tj_Frame_Green, 16 ;
    Tj_Frame_Blue, 32 ;
    Calibration_status, 63 ;
    Tj_Frame_NTC, 48 ;
  }
  PWM_wo_Comp: 21, ALM_Node, 8 {
    PWM_wo_Comp_Red, 0 ;
    PWM_wo_Comp_Green, 16 ;
    PWM_wo_Comp_Blue, 32 ;
    VF_Frame_VS, 48 ;
  }
  NVM_Debug: 22, ALM_Node, 8 {
    NVM_Static_Valid, 0 ;
    NVM_Static_Rev, 16 ;
    NVM_Calib_Version, 32 ;
    NVM_OADCCAL, 40 ;
    NVM_GainADCLowCal, 48 ;
    NVM_GainADCHighCal, 56 ;
  }
}



Diagnostic_frames {
  MasterReq: 0x3c {
    MasterReqB0, 0 ;
    MasterReqB1, 8 ;
    MasterReqB2, 16 ;
    MasterReqB3, 24 ;
    MasterReqB4, 32 ;
    MasterReqB5, 40 ;
    MasterReqB6, 48 ;
    MasterReqB7, 56 ;
  }
  SlaveResp: 0x3d {
    SlaveRespB0, 0 ;
    SlaveRespB1, 8 ;
    SlaveRespB2, 16 ;
    SlaveRespB3, 24 ;
    SlaveRespB4, 32 ;
    SlaveRespB5, 40 ;
    SlaveRespB6, 48 ;
    SlaveRespB7, 56 ;
  }
}

Node_attributes {
    ALM_Node {
        LIN_protocol = 2.1 ;
        configured_NAD = 0x01 ;
        initial_NAD = 0x02 ;
        product_id = 0x0013, 0x0003, 1 ;
        response_error = SigCommErr ;
        P2_min = 50.0000 ms ;
        ST_min = 20.0000 ms ;
        configurable_frames {
            ALM_Req_A;
            ALM_Status;
      ColorConfigFrameRed ;
      ColorConfigFrameGreen ;
      ColorConfigFrameBlue ;
      PWM_Frame ;
      ConfigFrame ;
      VF_Frame ;
      Tj_Frame ;
      PWM_wo_Comp ;
      NVM_Debug ;
    }
  }
}

Schedule_tables {
 LIN_AA {
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x1, 0x2, 0xFF } delay 50 ms ;
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0x2, 0x1 } delay 20 ms ;
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0x2, 0x2 } delay 20 ms ;
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0x2, 0x3 } delay 20 ms ;
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0x2, 0x4 } delay 20 ms ;
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0x2, 0x5 } delay 20 ms ;
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0x2, 0x6 } delay 20 ms ;
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0x2, 0x7 } delay 20 ms ;
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0x2, 0x8 } delay 20 ms ;
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0x2, 0x9 } delay 20 ms ;
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0x2, 0xA } delay 20 ms ;
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0x2, 0xB } delay 20 ms ;
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0x2, 0xC } delay 20 ms ;
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0x2, 0xD } delay 20 ms ;
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0x2, 0xE } delay 20 ms ;
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0x2, 0xF } delay 20 ms ;
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0x2, 0x10 } delay 20 ms ;
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x3, 0x2, 0xFF } delay 20 ms ;
    FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x4, 0x2, 0xFF } delay 20 ms ;
  }
    User_serv {
        ALM_Req_A delay 10.0000 ms ;
    }
    Pub_serv {
        ALM_Status delay 20.0000 ms ;
    }
 RequestResponse {
    ALM_Req_A delay 10 ms ;
    ALM_Status delay 10 ms ;
  }
 CCO {
    ALM_Req_A delay 10 ms ;
    ALM_Status delay 10 ms ;
    ConfigFrame delay 10 ms ;
    ColorConfigFrameRed delay 10 ms ;
    ColorConfigFrameGreen delay 10 ms ;
    ColorConfigFrameBlue delay 10 ms ;
    VF_Frame delay 10 ms ;
    PWM_Frame delay 10 ms ;
    Tj_Frame delay 10 ms ;
    PWM_wo_Comp delay 10 ms ;
  }
 calib {
    NVM_Debug delay 10 ms ;
  }
}


Signal_encoding_types {
    Red {
        physical_value,0,255,1.0000,0.0000,"Red" ;
    }
    Green {
        physical_value,0,255,1.0000,0.0000,"Green" ;
    }
    Blue {
        physical_value,0,255,1.0000,0.0000,"Blue" ;
    }
    Intensity {
        physical_value,0,255,1.0000,0.0000,"Intensity" ;
    }
    Update {
        logical_value,0x00,"Immediate color Update" ;
        logical_value,0x01,"Color memorization" ;
        logical_value,0x02,"Apply memorized color" ;
        logical_value,0x03,"Discard memorized color" ;
    }
    Mode {
        logical_value,0x00,"Immediate Setpoint" ;
        logical_value,0x01,"Fading effect 1 (color and intensity fade)" ;
        logical_value,0x02,"Fading effect 2 (intensity fade only; color changes immediately)" ;
        logical_value,0x03,"TBD" ;
        logical_value,0x04,"TBD" ;
        physical_value,5,63,1.0000,0.0000,"Not Used" ;
    }
    Duration {
        physical_value,0,255,0.2000,0.0000,"s" ;
    }
    ModuleID {
        physical_value,0,255,1.0000,0.0000,"ModuleID" ;
    }
    NVMStatus {
        logical_value,0x00,"NVM OK" ;
        logical_value,0x01,"NVM NOK" ;
        logical_value,0x02,"Reserved" ;
        logical_value,0x03,"Reserved" ;
        logical_value,0x04,"Reserved" ;
        logical_value,0x05,"Reserved" ;
        logical_value,0x06,"Reserved" ;
        logical_value,0x07,"Reserved" ;
        logical_value,0x08,"Reserved" ;
        logical_value,0x09,"Reserved" ;
        logical_value,0x0A,"Reserved" ;
        logical_value,0x0B,"Reserved" ;
        logical_value,0x0C,"Reserved" ;
        logical_value,0x0D,"Reserved" ;
        logical_value,0x0E,"Reserved" ;
        logical_value,0x0F,"Reserved" ;
    }
    VoltageStatus {
        logical_value,0x00,"Normal Voltage" ;
        logical_value,0x01,"Power UnderVoltage" ;
        logical_value,0x02,"Power OverVoltage" ;
        logical_value,0x03,"Reserved" ;
        logical_value,0x04,"Reserved" ;
        logical_value,0x05,"Reserved" ;
        logical_value,0x06,"Reserved" ;
        logical_value,0x07,"Reserved" ;
        logical_value,0x08,"Reserved" ;
        logical_value,0x09,"Reserved" ;
        logical_value,0x0A,"Reserved" ;
        logical_value,0x0B,"Reserved" ;
        logical_value,0x0C,"Reserved" ;
        logical_value,0x0D,"Reserved" ;
        logical_value,0x0E,"Reserved" ;
        logical_value,0x0F,"Reserved" ;
    }
    ThermalStatus {
        logical_value,0x00,"Normal Temperature" ;
        logical_value,0x01,"Thermal derating" ;
        logical_value,0x02,"Thermal shutdown" ;
        logical_value,0x03,"Reserved" ;
        logical_value,0x04,"Reserved" ;
        logical_value,0x05,"Reserved" ;
        logical_value,0x06,"Reserved" ;
        logical_value,0x07,"Reserved" ;
        logical_value,0x08,"Reserved" ;
        logical_value,0x09,"Reserved" ;
        logical_value,0x0A,"Reserved" ;
        logical_value,0x0B,"Reserved" ;
        logical_value,0x0C,"Reserved" ;
        logical_value,0x0D,"Reserved" ;
        logical_value,0x0E,"Reserved" ;
        logical_value,0x0F,"Reserved" ;
    }
    LED_State {
        logical_value,0x00,"LED OFF" ;
        logical_value,0x01,"LED ANIMATING" ;
        logical_value,0x02,"LED ON" ;
        logical_value,0x03,"Reserved" ;
    }
  NVM_Static_Valid_Encoding {
    logical_value, 0, "NVM Corrupted/Zero" ;
    logical_value, 42331, "NVM Valid (0xA55B)" ;
    logical_value, 65535, "NVM Empty/Erased" ;
  }

  NVM_Static_Rev_Encoding {
    logical_value, 0, "Invalid Revision" ;
    logical_value, 1, "Revision 1 (Current)" ;
    logical_value, 65535, "Not Programmed" ;
  }
  NVM_Calib_Version_Encoding {
    physical_value, 0, 255, 1, 0, "Factory Calib Version (>=1 valid)" ;
  }
  NVM_OADCCAL_Encoding {
    physical_value, 0, 255, 1, 0, "ADC Offset Cal (signed 8-bit)" ;
  }
  NVM_GainADCLowCal_Encoding {
    physical_value, 0, 255, 1, 0, "ADC Gain Low Temp (signed 8-bit)" ;
  }
  NVM_GainADCHighCal_Encoding {
    physical_value, 0, 255, 1, 0, "ADC Gain High Temp (signed 8-bit)" ;
  }
}

Signal_representation {
    Red:AmbLightColourRed;
    Green:AmbLightColourGreen;
    Blue:AmbLightColourBlue;
    Intensity:AmbLightIntensity;
    Update:AmbLightUpdate;
    Mode:AmbLightMode;
    Duration:AmbLightDuration;
    ModuleID:AmbLightLIDFrom,AmbLightLIDTo;
    NVMStatus:ALMNVMStatus;
    LED_State:ALMLEDState;
  NVM_Calib_Version_Encoding: NVM_Calib_Version ;
  NVM_GainADCHighCal_Encoding: NVM_GainADCHighCal ;
  NVM_GainADCLowCal_Encoding: NVM_GainADCLowCal ;
  NVM_OADCCAL_Encoding: NVM_OADCCAL ;
  NVM_Static_Rev_Encoding: NVM_Static_Rev ;
  NVM_Static_Valid_Encoding: NVM_Static_Valid ;
}
