declare namespace SigApi {
    interface EventJournalEntry {
        readonly id?: number
        readonly state?: number
        readonly crc?: number
        readonly idxcnt?: number
        readonly valid?: number
        readonly quit?: boolean
        readonly time?: number
        readonly date?: number
        readonly data?: ArrayBuffer
        readonly datalen: number
        readonly dataAsStr: string
        readonly error?: number
        readonly text: string
        readonly alarmNr?: number
        readonly param1: number | string
        readonly param2: number | string
        readonly param3: number | string
        readonly param1unitText: string
        readonly param2unitText: string
        readonly param3unitText: string
        readonly param1formated: string
        readonly param2formated: string
        readonly param3formated: string
        readonly varno?: number
        readonly alarmGroup?: number
        readonly groupbit?: number
        readonly nopara?: number
        readonly hidden?: boolean
        readonly varname: string
        readonly timeHiFirst?: number
        readonly dateHiFirst?: number
        readonly timeHiLast?: number
        readonly dateHiLast?: number
        readonly timeLo?: number
        readonly dateLo?: number
        readonly timeQuit?: number
        readonly dateQuit?: number
        readonly num?: number
        readonly type?: number
        readonly reason?: number
        readonly oldVal?: number
        readonly newVal?: number
        readonly oldValFormated?: number | string
        readonly newValFormated?: number | string
        readonly userAsStr: string
        readonly userID?: number
        readonly roles?: number[]
        readonly rolesAsStr?: string[]
        readonly oldValStr: string
        readonly newValStr: string
        readonly dpne: string
        readonly unitText?: string
        readonly alarmConfigId?: number
        readonly stationNr?: number
        /**
         * Returns an object of this class in a simple data structure. Unset values are returned with ''.
         * 
         * @returns {object} Object as a simple data structure
         */
        getAsFlatObject(): any
        /**
         * Gets the CRC of an EventJournalEntry
         * 
         * @returns {number} The CRC of the EventJournalEntry
         */
        getCRC(): number
        /**
         * Gets the unique record id of the EventJournalEntry
         * 
         * @returns {number} The unique record id of the EventJournalEntry
         */
        getIdxCnt(): number
        /**
         * Checks if the EventJournalEntry is valid (0xFF = valid)
         * 
         * @returns {boolean} true if the EventJournalEntry is valid and false if not
         */
        isValid(): boolean
        /**
         * Gets the id of the EventJournalEntry
         * ranges of ids: 
         * * 0x0000-0x7FFF for user
         * * 0x8000-0xBFFF for appli
         * * 0xC000-0xFFFF for system
         * defined ids:
         * * EVENTJOURNAL_DEFAULT = 0x0000;
         * * EVENTJOURNAL_ALARM = 0xFFFE;
         * * EVENTJOURNAL_SET_POINT = 0xFFFD;
         * * EVENTJOURNAL_MESSAGE = 0xFFFC;
         * * EVENTJOURNAL_WARNING = 0xFFFB;
         * * EVENTJOURNAL_ERROR = 0xFFFA;
         * * EVENTJOURNAL_LOG_IN_OUT = 0xFFF9;
         * * EVENTJOURNAL_POWER_ON_OFF = 0xFFF8;
         * * EVENTJOURNAL_DEL_ALL = 0xFFF7;
         * * EVENTJOURNAL_SET_POINT_STR = 0xFFF6;
         * * EVENTJOURNAL_RECIPE_LOAD = 0xFFF5;
         * * EVENTJOURNAL_RECIPE_SAVE = 0xFFF4;
         * * EVENTJOURNAL_USER_TEXT = 0xFFF3;
         * * EVENTJOURNAL_STATION_RECONNECT = 0xFFF2;
         * 
         * @returns {number} The id of the EventJournalEntry
         */
        getId(): number
        /**
         * Gets the time on which the EventJournalEntry was logged
         * 
         * @returns {number} The time of the EventJournalEntry in the Sigmatek time format
         */
        getTime(): number
        /**
         * Gets the date on which the EventJournalEntry was logged
         * 
         * @returns {number} The date of the EventJournalEntry in the Sigmatek date format
         */
        getDate(): number
        /**
         * Gets the alarm number of the EventJournalEntry
         * alarmnumber is the value of the Client 'Config' from associated alarm object in LC2
         * 
         * @returns {number} The alarmnumber of the EventJournalEntry
         */
        getAlarmNr(): number
        /**
         * Gets the parameter1 of the EventJournalEntry
         * parameter1 is the value of the Client 'Para1' of the associated alarm object in LC2
         *
         * @returns {number|string} The parameter 1 of the EventJournalEntry
         */
        getParam1(): number | string
        /**
         * Gets the parameter2 of the EventJournalEntry
         * parameter2 is the value of the Client 'Para2' of the associated alarm object in LC2
         *
         * @returns {number|string} The parameter 2 of the EventJournalEntry
         */
        getParam2(): number | string
        /**
         * Gets the parameter3 of the EventJournalEntry
         * parameter3 is the value of the Client 'Para3' of the associated alarm object in LC2
         *
         * @returns {number|string} The parameter 3 of the EventJournalEntry
         */
        getParam3(): number | string
        /**
         * Gets the formated parameter1 of the EventJournalEntry
         * parameter1 is the value of the Client 'Para1' of the associated alarm object in LC2
         *
         * @returns {number|string} The formated parameter 1 of the EventJournalEntry
         */
        getParam1Formated(): number | string
        /**
         * Gets the formated parameter2 of the EventJournalEntry
         * parameter2 is the value of the Client 'Para2' of the associated alarm object in LC2
         *
         * @returns {number|string} The formated parameter 2 of the EventJournalEntry
         */
        getParam2Formated(): number | string
        /**
         * Gets the formated parameter3 of the EventJournalEntry
         * parameter3 is the value of the Client 'Para3' of the associated alarm object in LC2
         *
         * @returns {number|string} The formated parameter 3 of the EventJournalEntry
         */
        getParam3Formated(): number | string
        /**
         * Gets the unit text of parameter1 of the EventJournalEntry
         * parameter1 is the value of Client 'Para1' of the associated alarm object in LC2
         *
         * @returns {string} The unit text of parameter 1 of the EventJournalEntry
         */
        getParam1UnitText(): string
        /**
         * Gets the unit text of parameter2 of the EventJournalEntry
         * parameter2 is the value of the Client 'Para2' of the associated alarm object in LC2
         *
         * @returns {string} The unit text of parameter 2 of the EventJournalEntry
         */
        getParam2UnitText(): string
        /**
         * Gets the unit text of parameter3 of the EventJournalEntry
         * parameter3 is the value of the Client 'Para3' of the associated alarm object in LC2
         *
         * @returns {string} The unit text of parameter 3 of the EventJournalEntry
         */
        getParam3UnitText(): string
        /**
         * Gets the alarm group of the EventJournalEntry
         * alarm group is the value of the Client 'Group' of th associated alarm object in LC2
         *
         * @returns {number} The alarm group of the EventJournalEntry
         */
        getAlarmGroup(): number
        /**
         * Gets the data/information of the EventJournalEntry as string
         * 
         * @returns {string} the data/information of the EventJournalEntry as string
         */
        getDataAsStr(): string
        /**
         * Gets the number of parameters
         * 
         * @returns {number} the number of parameters
         */
        getNumPara(): number
        /**
         * Gets the parameter property, defined by propertyName, at the specified paramIndex of the EventJournalEntry.
         * @param {number} paramIndex index of the parameter
         * range of paramIndex: 
         * * 1 to this.nopara
         * @param {string} propertyName name of the parameter property
         * defined propertyName:
         * * value: the value of the property
         * * varid: the varId of the property
         * * valueFormated: the formated value of the property
         * * unitText: the unitText of the property or undefined
         * @returns {number|string|undefined} The parameter at the specified index of the EventJournalEntry
         */
        getParamProperty(paramIndex: number, propertyName: string): number | string | undefined
        /**
         * Gets the alarm config id
         * 
         * @returns {number|null}
         */
        getAlarmConfigId(): number | null
        /**
         * Gets the stationNr
         * 
         * @returns {number|null}
         */
        getStationNr(): number | null
    }

    // alternative, more descriptive interface for EventJournalEntry;
    // types need to be determinded by attribute: id and casted to its corresponding EventJournal type 
    interface EventJournalBase {
        readonly crc?: number
        readonly dataAsStr?: string
        readonly data?: ArrayBuffer
        readonly datalen: number
        readonly date?: number
        readonly id?: number
        readonly idxcnt?: number
        readonly time?: number
        readonly valid?: number
        /**
         * Gets the CRC of an EventJournalEntry
         * 
         * @returns {number} The CRC of the EventJournalEntry
         */
        getCRC(): number
        /**
         * Gets the data/information of the EventJournalEntry as string
         * 
         * @returns {string} the data/information of the EventJournalEntry as string
         */
        getDataAsStr(): string
        /**
         * Gets the date on which the EventJournalEntry was logged
         * 
         * @returns {number} The date of the EventJournalEntry in the Sigmatek date format
         */
        getDate(): number
        /**
         * Gets the id of the EventJournalEntry
         * ranges of ids: 
         * * 0x0000-0x7FFF for user
         * * 0x8000-0xBFFF for appli
         * * 0xC000-0xFFFF for system
         * defined ids:
         * * EVENTJOURNAL_DEFAULT = 0x0000;
         * * EVENTJOURNAL_ALARM = 0xFFFE;
         * * EVENTJOURNAL_SET_POINT = 0xFFFD;
         * * EVENTJOURNAL_MESSAGE = 0xFFFC;
         * * EVENTJOURNAL_WARNING = 0xFFFB;
         * * EVENTJOURNAL_ERROR = 0xFFFA;
         * * EVENTJOURNAL_LOG_IN_OUT = 0xFFF9;
         * * EVENTJOURNAL_POWER_ON_OFF = 0xFFF8;
         * * EVENTJOURNAL_DEL_ALL = 0xFFF7;
         * * EVENTJOURNAL_SET_POINT_STR = 0xFFF6;
         * * EVENTJOURNAL_RECIPE_LOAD = 0xFFF5;
         * * EVENTJOURNAL_RECIPE_SAVE = 0xFFF4;
         * * EVENTJOURNAL_USER_TEXT = 0xFFF3;
         * * EVENTJOURNAL_STATION_RECONNECT = 0xFFF2;
         * 
         * @returns {number} The id of the EventJournalEntry
         */
        getId(): number
        /**
         * Gets the unique record id of the EventJournalEntry
         * 
         * @returns {number} The unique record id of the EventJournalEntry
         */
        getIdxCnt(): number
        /**
         * Gets the time on which the EventJournalEntry was logged
         * 
         * @returns {number} The time of the EventJournalEntry in the Sigmatek time format
         */
        getTime(): number
        /**
         * Checks if the EventJournalEntry is valid (0xFF = valid)
         * 
         * @returns {boolean} true if the EventJournalEntry is valid and false if not
         */
        isValid(): boolean
    }

    interface EventJournalAlarm extends EventJournalBase {
        readonly alarmConfigId?: number
        readonly alarmGroup?: number
        readonly alarmNr?: number
        readonly dateHiFirst?: number
        readonly dateHiLast?: number
        readonly dateLo?: number
        readonly dateQuit?: number
        readonly groupbit?: number
        readonly num?: number
        readonly param1: number | string
        readonly param2: number | string
        readonly param3: number | string
        readonly param1unitText: string
        readonly param2unitText: string
        readonly param3unitText: string
        readonly param1formated: string
        readonly param2formated: string
        readonly param3formated: string
        readonly state?: number
        readonly timeHiFirst?: number
        readonly timeHiLast?: number
        readonly timeLo?: number
        readonly timeQuit?: number
        readonly varno?: number
        /**
         * Gets the alarm config id
         * 
         * @returns {number|null}
         */
        getAlarmConfigId(): number | null
        /**
         * Gets the alarm group of the EventJournalEntry
         * alarm group is the value of the Client 'Group' of the associated alarm object in LC2
         *
         * @returns {number} The alarm group of the EventJournalEntry
         */
        getAlarmGroup(): number
        /**
         * Gets the alarm number of the EventJournalEntry
         * alarmnumber is the value of the Client 'Config' from associated alarm object in LC2
         * 
         * @returns {number} The alarmnumber of the EventJournalEntry
         */
        getAlarmNr(): number
        /**
         * Gets the parameter1 of the EventJournalEntry
         * parameter1 is the value of the Client 'Para1' of the associated alarm object in LC2
         *
         * @returns {number|string} The parameter 1 of the EventJournalEntry
         */
        getParam1(): number | string
        /**
         * Gets the formated parameter1 of the EventJournalEntry
         * parameter1 is the value of the Client 'Para1' of the associated alarm object in LC2
         *
         * @returns {number|string} The formated parameter 1 of the EventJournalEntry
         */
        getParam1Formated(): number | string
        /**
         * Gets the unit text of parameter1 of the EventJournalEntry
         * parameter1 is the value of Client 'Para1' of the associated alarm object in LC2
         *
         * @returns {string} The unit text of parameter 1 of the EventJournalEntry
         */
        getParam1UnitText(): string
        /**
         * Gets the parameter2 of the EventJournalEntry
         * parameter2 is the value of the Client 'Para2' of the associated alarm object in LC2
         *
         * @returns {number|string} The parameter 2 of the EventJournalEntry
         */
        getParam2(): number | string
        /**
         * Gets the formated parameter2 of the EventJournalEntry
         * parameter2 is the value of the Client 'Para2' of the associated alarm object in LC2
         *
         * @returns {number|string} The formated parameter 2 of the EventJournalEntry
         */
        getParam2Formated(): number | string
        /**
         * Gets the unit text of parameter2 of the EventJournalEntry
         * parameter2 is the value of the Client 'Para2' of the associated alarm object in LC2
         *
         * @returns {string} The unit text of parameter 2 of the EventJournalEntry
         */
        getParam2UnitText(): string
        /**
         * Gets the parameter3 of the EventJournalEntry
         * parameter3 is the value of the Client 'Para3' of the associated alarm object in LC2
         *
         * @returns {number|string} The parameter 3 of the EventJournalEntry
         */
        getParam3(): number | string
        /**
         * Gets the formated parameter3 of the EventJournalEntry
         * parameter3 is the value of the Client 'Para3' of the associated alarm object in LC2
         *
         * @returns {number|string} The formated parameter 3 of the EventJournalEntry
         */
        getParam3Formated(): number | string
        /**
         * Gets the unit text of parameter3 of the EventJournalEntry
         * parameter3 is the value of the Client 'Para3' of the associated alarm object in LC2
         *
         * @returns {string} The unit text of parameter 3 of the EventJournalEntry
         */
        getParam3UnitText(): string
        /**
         * Gets the number of parameters
         * 
         * @returns {number} the number of parameters
         */
        getNumPara(): number
        /**
         * Gets the parameter property, defined by propertyName, at the specified paramIndex of the EventJournalEntry.
         * @param {number} paramIndex index of the parameter
         * range of paramIndex: 
         * * 1 to this.nopara
         * @param {string} propertyName name of the parameter property
         * defined propertyName:
         * * value: the value of the property
         * * varid: the varId of the property
         * * valueFormated: the formated value of the property
         * * unitText: the unitText of the property or undefined
         * @returns {number|string|undefined} The parameter at the specified index of the EventJournalEntry
         */
        getParamProperty(paramIndex: number, propertyName: string): number | string | undefined
    }

    interface EventJournalSetPoint extends EventJournalBase {
        readonly newVal?: number
        readonly newValFormated?: number | string
        readonly oldVal?: number
        readonly oldValFormated?: number | string
        readonly reason?: number
        readonly roles?: number[]
        readonly rolesAsStr?: string[]
        readonly userAsStr: string
        readonly userID?: number
        readonly varno?: number
    }

    interface EventJournalMessage extends EventJournalBase {
        readonly roles?: number[]
        readonly rolesAsStr?: string[]
        readonly text: string
        readonly userAsStr: string
        readonly userID?: number
    }

    interface EventJournalWarning extends EventJournalBase {
        readonly roles?: number[]
        readonly rolesAsStr?: string[]
        readonly text: string
        readonly userAsStr: string
        readonly userID?: number
    }

    interface EventJournalError extends EventJournalBase {
        readonly roles?: number[]
        readonly rolesAsStr?: string[]
        readonly text: string
        readonly userAsStr: string
        readonly userID?: number
    }

    interface EventJournalLogInOut extends EventJournalBase {
        readonly roles?: number[]
        readonly rolesAsStr?: string[]
        readonly state?: number
        readonly userAsStr: string
        readonly userID?: number
    }

    interface EventJournalPowerOnOff extends EventJournalBase {
        readonly state?: number
    }

    interface EventJournalDeleteAll extends EventJournalBase {
        readonly roles?: number[]
        readonly rolesAsStr?: string[]
        readonly userAsStr: string
        readonly userID?: number
    }

    interface EventJournalSetPointStr extends EventJournalBase {
        readonly newValStr: string
        readonly oldValStr: string
        readonly reason?: number
        readonly roles?: number[]
        readonly rolesAsStr?: string[]
        readonly userAsStr: string
        readonly userID?: number
        readonly varno?: number
    }

    interface EventJournalRecipeLoad extends EventJournalBase {
        readonly dpne: string
        readonly error?: number
        readonly state?: number
    }

    interface EventJournalRecipeSave extends EventJournalBase {
        readonly dpne: string
        readonly error?: number
        readonly state?: number
    }

    interface EventJournalUserText extends EventJournalBase {
        readonly roles?: number[]
        readonly rolesAsStr?: string[]
        readonly text: string
        readonly userAsStr: string
        readonly userID?: number
    }

    interface EventJournalStationReconnect extends EventJournalBase {
        readonly stationNr?: number
    }

}
