90 lines
3.8 KiB
C
90 lines
3.8 KiB
C
//**********************************************************************************************************************************************************************************
|
|
// Fichier C_COMMANDES_.H
|
|
//
|
|
// Contient toutes définitions de constantes liées au commandes sur C_Bus
|
|
//**********************************************************************************************************************************************************************************/
|
|
|
|
|
|
// Codes commande Down :
|
|
#define C_BUS_DOWN_COMMANDE_CONFIG_DATE_HEURE 0x01
|
|
#define C_BUS_DOWN_COMMANDE_CONFIG_CARTE 0x02
|
|
#define C_BUS_DOWN_COMMANDE_CONFIG_CIRCUITS 0x03
|
|
#define C_BUS_DOWN_COMMANDE_CONFIG_LEVEL_SENSORS 0x04
|
|
#define C_BUS_DOWN_COMMANDE_CONFIG_OW 0x05
|
|
#define C_BUS_DOWN_COMMANDE_CONFIG_BATTERIES 0x06
|
|
#define C_BUS_DOWN_COMMANDE_CONFIG_PGN_NMEA 0x07
|
|
|
|
#define C_BUS_DOWN_COMMANDE_RESET 0x10
|
|
#define C_BUS_DOWN_COMMANDE_CDE_BACKLIGHT 0x11
|
|
#define C_BUS_DOWN_COMMANDE_CDE_CIRCUITS 0x12
|
|
// C_BUS_DOWN_COMMANDE_CDE_SORTIES_AUX 0x13 Plus utilisé depuis la suppression des sorties Aux de ShipBase
|
|
#define C_BUS_DOWN_COMMANDE_CDE_CARTE 0x14
|
|
|
|
#define C_BUS_DOWN_COMMANDE_LECTURE_DATE_HEURE 0x20
|
|
#define C_BUS_DOWN_COMMANDE_LECTURE_ID_CARTE 0x21
|
|
|
|
#define C_BUS_DOWN_COMMANDE_ANNUAIRE_K_BUS 0x32
|
|
#define C_BUS_DOWN_COMMANDE_CHARGEMENT_CODE 0x33
|
|
#define C_BUS_DOWN_COMMANDE_ANNUAIRE_OW 0x34
|
|
|
|
|
|
// Codes commande Up :
|
|
#define C_BUS_UP_COMMANDE_ETAT_CARTE 0x80
|
|
#define C_BUS_UP_COMMANDE_ETAT_CIRCUITS 0x81
|
|
#define C_BUS_UP_COMMANDE_ETAT_ENTREES_AUX 0x82
|
|
#define C_BUS_UP_COMMANDE_ETAT_LEVEL_SENSORS 0x83
|
|
#define C_BUS_UP_COMMANDE_ETAT_ENTREES_VOLT 0x84
|
|
#define C_BUS_UP_COMMANDE_ETAT_ENTREES_OW 0x85
|
|
#define C_BUS_UP_COMMANDE_ETAT_ENTREES_BATTERIES 0x86
|
|
#define C_BUS_UP_COMMANDE_ETAT_PGN_NMEA 0x87
|
|
|
|
#define C_BUS_UP_COMMANDE_CONFIG_CARTE 0x90
|
|
|
|
// Cdes cartes :
|
|
#define C_BUS_COMMANDE_CDE_CARTE_LOCALISATION 1
|
|
#define C_BUS_COMMANDE_CDE_CARTE_ETAT_SYSTEME 2 // Uniquement destiné à ShipBase. La consigne porte la valeur de l'état (0=Normal, 1=Alerte, 2=Alarme)
|
|
|
|
#define C_BUS_COMMANDE_CDE_CARTE_ETAT_SYSTEME_NORMAL 0
|
|
#define C_BUS_COMMANDE_CDE_CARTE_ETAT_SYSTEME_ALERTE 1
|
|
#define C_BUS_COMMANDE_CDE_CARTE_ETAT_SYSTEME_ALARME 2
|
|
#define C_BUS_COMMANDE_CDE_CARTE_MAX_CONSIGNE C_BUS_COMMANDE_CDE_CARTE_ETAT_SYSTEME_ALARME // Valeur maximale de la consigne d'une commande carte (2=ALARME)
|
|
|
|
// Commandes de config :
|
|
#define C_BUS_CONFIG_AUCUNE -1
|
|
#define C_BUS_CONFIG_LECTURE_SEULE 0
|
|
#define C_BUS_CONFIG_WRITE_COURANTE 1
|
|
#define C_BUS_CONFIG_WRITE_USINE 2
|
|
|
|
// Codes d'erreur :
|
|
#define C_BUS_ERREUR_AUCUNE 0
|
|
#define C_BUS_ERREUR_COMMANDE_INCONNUE 1
|
|
#define C_BUS_ERREUR_FORMAT_COMMANDE 2
|
|
#define C_BUS_ERREUR_PARAMETRE_INCONNU 3
|
|
#define C_BUS_ERREUR_LONGUEUR_PARAMETRE 4
|
|
#define C_BUS_ERREUR_ADRESSE_MAC 5
|
|
#define C_BUS_ERREUR_ADRESSE_BUS 6
|
|
#define C_BUS_ERREUR_FORMAT_DATE 7
|
|
#define C_BUS_ERREUR_FORMAT_HEURE 8
|
|
#define C_BUS_ERREUR 9
|
|
#define C_BUS_ERREUR_NUMERO_CIRCUIT 10
|
|
#define C_BUS_ERREUR_VALEUR_CONSIGNE 11
|
|
#define C_BUS_ERREUR_MODE_COMMANDE 12
|
|
#define C_BUS_ERREUR_TYPE_CIRCUIT 13
|
|
#define C_BUS_ERREUR_COMPATIBILITE_MODE_TYPE 14
|
|
#define C_BUS_ERREUR_VALEUR_VALIDITE 15
|
|
#define C_BUS_ERREUR_VALEUR_SEUIL 16
|
|
#define C_BUS_ERREUR_VALEUR_FILTRAGE 17
|
|
#define C_BUS_ERREUR_RTC 18
|
|
#define C_BUS_ERREUR_NO_CARTE 19
|
|
#define C_BUS_ERREUR_CONSIGNE_BACKLIGHT 20
|
|
#define C_BUS_VALEUR_HORS_DOMAINE 21
|
|
#define C_BUS_ERREUR_BLOCS 22
|
|
#define C_BUS_ERREUR_VALEUR_TAILLE 23
|
|
#define C_BUS_ERREUR_FLASH 24
|
|
#define C_BUS_ERREUR_CRC 25
|
|
#define C_BUS_ERREUR_PRIORITE 26
|
|
|
|
|
|
|
|
|