Skip to content

Commit

Permalink
v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueAndi committed Sep 11, 2021
1 parent 286e034 commit f78860d
Show file tree
Hide file tree
Showing 38 changed files with 1,282 additions and 1,088 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.3.0

- Update to VSCP framework v1.3.0, please see the ![changelog](https://github.com/BlueAndi/vscp-framework/releases/tag/v1.3.0) there.


## 1.2.0

- Update to VSCP framework v1.2.0, please see the ![changelog](https://github.com/BlueAndi/vscp-framework/releases/tag/v1.2.0) there.
Expand Down
4 changes: 2 additions & 2 deletions examples/Generic/Generic.ino
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void setup() {
vscp.setup(
8, // Status lamp pin
7, // Init button pin
nodeGuid, // Node GUID,
nodeGuid, // Node GUID
255, // Node zone (255 = all zones)
255, // Node sub-zone (255 = all sub-zones)
transportRead, // VSCP framework calls it to read a message
Expand Down Expand Up @@ -179,4 +179,4 @@ void loop() {

}

}
}
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vscp-arduino",
"version": "1.2.0",
"version": "1.3.0",
"keywords": "vscp, arduino-library, vscp-arduino, automation, home automation",
"description": "Very Simple Control Procotol (VSCP) Level 1 Library for the arduino IDE.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=VSCP
version=1.2.0
version=1.3.0
author=Andreas Merkle
maintainer=Andreas Merkle <vscp@blue-andi.de>
sentence=Very Simple Control Protocol L1 framework for all Arduino boards.
Expand Down
16 changes: 8 additions & 8 deletions src/framework/core/vscp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ extern uint32_t vscp_core_getTimeSinceEpoch(void)
* Set the time since epoch 00:00:00 UTC, January 1, 1970.
* Note, if a segment master is present, it will overwrite the time with its
* heartbeat message.
*
*
* @param[in] timestamp Unix timestamp
*/
extern void vscp_core_setTimeSinceEpoch(uint32_t timestamp)
Expand Down Expand Up @@ -797,7 +797,7 @@ static inline void vscp_core_stateStartup(void)
/**
* Change to init state.
* - Drop nickname id.
*
*
* @param[in] probeSegmentMaster Probe for segment master (true) or start own nickname discovery (false).
*/
static inline void vscp_core_changeToStateInit(BOOL probeSegmentMaster)
Expand Down Expand Up @@ -1574,7 +1574,7 @@ static inline void vscp_core_handleProtocolHeartbeat(void)
vscp_core_changeToStateInit(TRUE);
}
}

/* If available, store time since epoch 00:00:00 UTC, January 1, 1970 */
if (5 <= vscp_core_rxMessage.dataNum)
{
Expand Down Expand Up @@ -1700,19 +1700,19 @@ static inline void vscp_core_handleProtocolDropNicknameId(void)
(3 == vscp_core_rxMessage.dataNum))
{
uint8_t waitTime = 0;

/* Wait time received? */
if (3 == vscp_core_rxMessage.dataNum)
{
waitTime = vscp_core_rxMessage.data[2];
}

/* Byte 1:
* Bit 5 - Reset device. Keep nickname.
* Bit 6 - Set persistent storage to default.
* Bit 7 - Go idle. Do not start up again.
*/

/* Set persistent memory to default (bit 6)? */
if (0 != (vscp_core_rxMessage.data[1] & (1 << 6)))
{
Expand Down Expand Up @@ -1980,7 +1980,7 @@ static uint8_t vscp_core_readRegister(uint16_t page, uint8_t addr)
break;
}
}

#if VSCP_CONFIG_BASE_IS_ENABLED( VSCP_CONFIG_ENABLE_DM )
/* Is the addressed register part of the decision matrix? */
else if (FALSE != vscp_dm_isDecisionMatrix(page, addr))
Expand Down Expand Up @@ -2211,7 +2211,7 @@ static uint8_t vscp_core_writeRegister(uint16_t page, uint8_t addr, uint8_t val
/* Write protection disabled? */
else if (0 != vscp_core_getRegAppWriteProtect())
{

#if VSCP_CONFIG_BASE_IS_ENABLED( VSCP_CONFIG_ENABLE_DM )
/* Is the addressed register part of the decision matrix? */
if (FALSE != vscp_dm_isDecisionMatrix(page, addr))
Expand Down
10 changes: 5 additions & 5 deletions src/framework/core/vscp_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,16 @@ extern "C"
#define VSCP_CORE_VERSION_MAJOR (1)

/** VSCP specification minor version number, the framework is compliant to. */
#define VSCP_CORE_VERSION_MINOR (11)
#define VSCP_CORE_VERSION_MINOR (12)

/** VSCP specification sub-minor version number, the framework is compliant to. */
#define VSCP_CORE_VERSION_SUB_MINOR (0)
#define VSCP_CORE_VERSION_SUB_MINOR (2)

/** VSCP specification version string, the framework is compliant to. */
#define VSCP_CORE_VERSION_STR "v1.11.00"
#define VSCP_CORE_VERSION_STR "v1.12.2"

/** VSCP framework version string */
#define VSCP_CORE_FRAMEWORK_VERSION "v1.2.0"
#define VSCP_CORE_FRAMEWORK_VERSION "v1.3.0"

/*******************************************************************************
MACROS
Expand Down Expand Up @@ -201,7 +201,7 @@ extern uint32_t vscp_core_getTimeSinceEpoch(void);
* Set the time since epoch 00:00:00 UTC, January 1, 1970.
* Note, if a segment master is present, it will overwrite the time with its
* heartbeat message.
*
*
* @param[in] timestamp Unix timestamp
*/
extern void vscp_core_setTimeSinceEpoch(uint32_t timestamp);
Expand Down
2 changes: 1 addition & 1 deletion src/framework/core/vscp_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ extern void vscp_dm_init(void)
*/
extern void vscp_dm_restoreFactoryDefaultSettings(void)
{
uint16_t index = 0;
uint16_t index = 0;
vscp_dm_MatrixRow row = { 0, 0, 0, 0, 0, 0, 0, 0 };

#if VSCP_CONFIG_BASE_IS_ENABLED( VSCP_CONFIG_ENABLE_DM_EXTENSION )
Expand Down
5 changes: 5 additions & 0 deletions src/framework/core/vscp_type_alarm.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ extern "C"
*/
#define VSCP_TYPE_ALARM_WATCHDOG 12

/**
* Indicates a alarm reset condition.
*/
#define VSCP_TYPE_ALARM_RESET 13

/*******************************************************************************
MACROS
*******************************************************************************/
Expand Down
5 changes: 5 additions & 0 deletions src/framework/core/vscp_type_information.h
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,11 @@ extern "C"
*/
#define VSCP_TYPE_INFORMATION_DECREMENTED 87

/**
* Proximity detected.
*/
#define VSCP_TYPE_INFORMATION_PROXIMITY_DETECTED 88

/*******************************************************************************
MACROS
*******************************************************************************/
Expand Down
24 changes: 20 additions & 4 deletions src/framework/core/vscp_type_measurement.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ extern "C"
* Opt Unit: degree (1).
* Opt Unit: arcminute (2).
* Opt Unit: arcseconds (3).
* This is a measurement of an angle.
* This is a measurement of an angle or a direction or similar.
*/
#define VSCP_TYPE_MEASUREMENT_ANGLE 30

Expand Down Expand Up @@ -470,12 +470,28 @@ extern "C"
#define VSCP_TYPE_MEASUREMENT_RADIATION_DOSE_EXPOSURE 62

/**
* Default unit: Percent
* Optional unit: Röntgen/R (1)
* Ratio between power in kW and apperant power in kVA.
* Default unit: cos of phase angle.
* This is a measurment of a power factor. Power factor is an expression of energy efficiency. It is
* usually expressed as a percentage - and the lower the percentage, the less efficient power usage
* is.
*/
#define VSCP_TYPE_MEASUREMENT_POWER_FACTOR 63

/**
* Default unit: kVAr
* In electric power transmission and distribution, volt-ampere reactive (VAr) is a unit of
* measurement of reactive power. Reactive power exists in AC circuit when the current and voltage are
* not in phase.
*/
#define VSCP_TYPE_MEASUREMENT_REACTIVE_POWER 64

/**
* Default unit: kVArh
* Reactive energy is the electrical energy produced, flowing or supplied by an electric circuit
* during a time interval, measured in units of kVArh or standard multiples thereof.
*/
#define VSCP_TYPE_MEASUREMENT_REACTIVE_ENERGY 65

/*******************************************************************************
MACROS
*******************************************************************************/
Expand Down
30 changes: 30 additions & 0 deletions src/framework/events/vscp_evt_alarm.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,3 +447,33 @@ extern BOOL vscp_evt_alarm_sendWatchdog(uint8_t index, uint8_t zone, uint8_t sub
return vscp_core_sendEvent(&txMsg);
}

/**
* Alarm reset
*
* @param[in] alarmRegister Alarm byte from standard register 128/0x80.
* @param[in] zone Zone for which event applies to (0-255). 255 is all zones.
* @param[in] subZone Sub-zone for which event applies to (0-255). 255 is all sub-zones.
*
* @return If event is sent, it will return TRUE otherwise FALSE.
*/
extern BOOL vscp_evt_alarm_sendAlarmReset(uint8_t alarmRegister, uint8_t zone, uint8_t subZone)
{
vscp_TxMessage txMsg;
uint8_t size = 0;

vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_ALARM, VSCP_TYPE_ALARM_RESET, VSCP_PRIORITY_3_NORMAL);

txMsg.data[0] = alarmRegister;
size += 1;

txMsg.data[1] = zone;
size += 1;

txMsg.data[2] = subZone;
size += 1;

txMsg.dataNum = size;

return vscp_core_sendEvent(&txMsg);
}

11 changes: 11 additions & 0 deletions src/framework/events/vscp_evt_alarm.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,15 @@ extern BOOL vscp_evt_alarm_sendDisarm(uint8_t onOff, uint8_t zone, uint8_t subZo
*/
extern BOOL vscp_evt_alarm_sendWatchdog(uint8_t index, uint8_t zone, uint8_t subZone);

/**
* Alarm reset
*
* @param[in] alarmRegister Alarm byte from standard register 128/0x80.
* @param[in] zone Zone for which event applies to (0-255). 255 is all zones.
* @param[in] subZone Sub-zone for which event applies to (0-255). 255 is all sub-zones.
*
* @return If event is sent, it will return TRUE otherwise FALSE.
*/
extern BOOL vscp_evt_alarm_sendAlarmReset(uint8_t alarmRegister, uint8_t zone, uint8_t subZone);

#endif /* __VSCP_EVT_ALARM_H__ */
30 changes: 15 additions & 15 deletions src/framework/events/vscp_evt_aol.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ extern BOOL vscp_evt_aol_sendSystemUnpluggedFromPowerSource(uint8_t index, uint8
}

/**
* System unplugged from power source
* System unplugged from network
*
* @param[in] index Index for record.
* @param[in] zone Zone for which event applies to (0-255). 255 is all zones.
Expand Down Expand Up @@ -148,7 +148,7 @@ extern BOOL vscp_evt_aol_sendSystemUnpluggedFromNetwork(uint8_t index, uint8_t z
}

/**
* System unplugged from power source
* Chassis intrusion
*
* @param[in] index Index for record.
* @param[in] zone Zone for which event applies to (0-255). 255 is all zones.
Expand Down Expand Up @@ -178,7 +178,7 @@ extern BOOL vscp_evt_aol_sendChassisIntrusion(uint8_t index, uint8_t zone, uint8
}

/**
* System unplugged from power source
* Processor removal
*
* @param[in] index Index for record.
* @param[in] zone Zone for which event applies to (0-255). 255 is all zones.
Expand Down Expand Up @@ -208,7 +208,7 @@ extern BOOL vscp_evt_aol_sendProcessorRemoval(uint8_t index, uint8_t zone, uint8
}

/**
* System unplugged from power source
* System environmental errors
*
* @param[in] index Index for record.
* @param[in] zone Zone for which event applies to (0-255). 255 is all zones.
Expand Down Expand Up @@ -238,7 +238,7 @@ extern BOOL vscp_evt_aol_sendSystemEnvironmentalErrors(uint8_t index, uint8_t zo
}

/**
* System unplugged from power source
* High temperature
*
* @param[in] index Index for record.
* @param[in] zone Zone for which event applies to (0-255). 255 is all zones.
Expand Down Expand Up @@ -268,7 +268,7 @@ extern BOOL vscp_evt_aol_sendHighTemperature(uint8_t index, uint8_t zone, uint8_
}

/**
* System unplugged from power source
* Fan speed problem
*
* @param[in] index Index for record.
* @param[in] zone Zone for which event applies to (0-255). 255 is all zones.
Expand Down Expand Up @@ -298,7 +298,7 @@ extern BOOL vscp_evt_aol_sendFanSpeedProblem(uint8_t index, uint8_t zone, uint8_
}

/**
* System unplugged from power source
* Voltage fluctuations
*
* @param[in] index Index for record.
* @param[in] zone Zone for which event applies to (0-255). 255 is all zones.
Expand Down Expand Up @@ -328,7 +328,7 @@ extern BOOL vscp_evt_aol_sendVoltageFluctuations(uint8_t index, uint8_t zone, ui
}

/**
* System unplugged from power source
* Operating system errors
*
* @param[in] index Index for record.
* @param[in] zone Zone for which event applies to (0-255). 255 is all zones.
Expand Down Expand Up @@ -358,7 +358,7 @@ extern BOOL vscp_evt_aol_sendOperatingSystemErrors(uint8_t index, uint8_t zone,
}

/**
* System unplugged from power source
* System power-on error
*
* @param[in] index Index for record.
* @param[in] zone Zone for which event applies to (0-255). 255 is all zones.
Expand Down Expand Up @@ -388,7 +388,7 @@ extern BOOL vscp_evt_aol_sendSystemPowerOnError(uint8_t index, uint8_t zone, uin
}

/**
* System unplugged from power source
* System is hung
*
* @param[in] index Index for record.
* @param[in] zone Zone for which event applies to (0-255). 255 is all zones.
Expand Down Expand Up @@ -418,7 +418,7 @@ extern BOOL vscp_evt_aol_sendSystemIsHung(uint8_t index, uint8_t zone, uint8_t s
}

/**
* System unplugged from power source
* Component failure
*
* @param[in] index Index for record.
* @param[in] zone Zone for which event applies to (0-255). 255 is all zones.
Expand Down Expand Up @@ -448,7 +448,7 @@ extern BOOL vscp_evt_aol_sendComponentFailure(uint8_t index, uint8_t zone, uint8
}

/**
* System unplugged from power source
* Remote system reboot upon report of a critical failure
*
* @param[in] index Index for record.
* @param[in] zone Zone for which event applies to (0-255). 255 is all zones.
Expand Down Expand Up @@ -478,7 +478,7 @@ extern BOOL vscp_evt_aol_sendRemoteSystemRebootUponReportOfACriticalFailure(uint
}

/**
* System unplugged from power source
* Repair Operating System
*
* @param[in] index Index for record.
* @param[in] zone Zone for which event applies to (0-255). 255 is all zones.
Expand Down Expand Up @@ -508,7 +508,7 @@ extern BOOL vscp_evt_aol_sendRepairOperatingSystem(uint8_t index, uint8_t zone,
}

/**
* System unplugged from power source
* Update BIOS image
*
* @param[in] index Index for record.
* @param[in] zone Zone for which event applies to (0-255). 255 is all zones.
Expand Down Expand Up @@ -538,7 +538,7 @@ extern BOOL vscp_evt_aol_sendUpdateBiosImage(uint8_t index, uint8_t zone, uint8_
}

/**
* System unplugged from power source
* Update Perform other diagnostic procedures
*
* @param[in] index Index for record.
* @param[in] zone Zone for which event applies to (0-255). 255 is all zones.
Expand Down
Loading

0 comments on commit f78860d

Please sign in to comment.