Skip to content

Commit

Permalink
- CLASS1.ALARM, Type=12, "Watchdog" added.
Browse files Browse the repository at this point in the history
- CLASS1.INFORMATION, Type=80, "Updated" added.
- CLASS1.WEATHER/CLASS1.WEATHER_FORECAST Type=52, "UV Index" added.
  • Loading branch information
BlueAndi committed Aug 22, 2019
1 parent 48213e3 commit 2e49282
Show file tree
Hide file tree
Showing 16 changed files with 202 additions and 10 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
## 0.8.1 (not released yet)
## 0.9.0

- VSCP framework
- Bugfixes:
- Fix of misspellings/typos, thanks to TomasRoj.
- VSCP measurement events fixed, because internal the parameters unit and index in the vscp_data_coding_getFormatByte() call were reversed. Thanks to troky!

- Features:
- CLASS1.ALARM, Type=12, "Watchdog" added.
- CLASS1.INFORMATION, Type=80, "Updated" added.
- CLASS1.WEATHER/CLASS1.WEATHER_FORECAST Type=52, "UV Index" added.

## 0.8.0

- Examples
Expand Down
11 changes: 5 additions & 6 deletions VERSION.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ How to release a software version?

1. Update the vscp_core.h accordingly.
2. Update the version in vscp/doc/Doxyfile.
3. Generate a new framework documentation.
4. Update CHANGELOG.md.
5. Commit and push all changes.
6. Create a github tag and mark the version with "pre" for pre-release, e.g. "V1.0.0pre".
7. Execute coverity tasks and update the source code accordingly.
8. If all bugfixes done, create a github tag for the release, e.g. "V1.0.0".
3. Update CHANGELOG.md.
4. Commit and push all changes.
5. Create a github tag and mark the version with "pre" for pre-release, e.g. "V1.0.0pre".
6. Execute coverity tasks and update the source code accordingly.
7. If all bugfixes done, create a github tag for the release, e.g. "V1.0.0".

Software version format: V<major>.<minor>.<patch>
- Increase the major number in case of incompatible interface changes or incompatible behavior. That means that the user of the framework has to adapt its implementation too.
Expand Down
2 changes: 1 addition & 1 deletion vscp/doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "VSCP framework"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = v0.8.0
PROJECT_NUMBER = v0.9.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
25 changes: 25 additions & 0 deletions vscp/events/vscp_alarm.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,31 @@ extern BOOL vscp_alarm_sendDisarm(uint8_t state, uint8_t zone, uint8_t subZone)
return vscp_core_sendEvent(&txMsg);
}

/**
* Issued when a watchdog has been triggered.
*
* @param[in] state State (0=off, 1=on)
* @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 Status
* @retval FALSE Failed to send the event
* @retval TRUE Event successul sent
*
*/
extern BOOL vscp_alarm_sendWatchdogEvent(uint8_t state, uint8_t zone, uint8_t subZone)
{
vscp_TxMessage txMsg;

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

txMsg.dataNum = 3;
txMsg.data[0] = state;
txMsg.data[1] = zone;
txMsg.data[2] = subZone;

return vscp_core_sendEvent(&txMsg);
}

/*******************************************************************************
LOCAL FUNCTIONS
*******************************************************************************/
Expand Down
13 changes: 13 additions & 0 deletions vscp/events/vscp_alarm.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,19 @@ extern BOOL vscp_alarm_sendArm(uint8_t state, uint8_t zone, uint8_t subZone);
*/
extern BOOL vscp_alarm_sendDisarm(uint8_t state, uint8_t zone, uint8_t subZone);

/**
* Issued when a watchdog has been triggered.
*
* @param[in] state State (0=off, 1=on)
* @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 Status
* @retval FALSE Failed to send the event
* @retval TRUE Event successul sent
*
*/
extern BOOL vscp_alarm_sendWatchdogEvent(uint8_t state, uint8_t zone, uint8_t subZone);

#endif /* __VSCP_ALARM_H__ */

/** @} */
25 changes: 25 additions & 0 deletions vscp/events/vscp_information.c
Original file line number Diff line number Diff line change
Expand Up @@ -2373,6 +2373,31 @@ extern BOOL vscp_information_sendFallingEvent(uint8_t index, uint8_t zone, uint8
return vscp_core_sendEvent(&txMsg);
}

/**
* Something has been updated.
*
* @param[in] index Index for device. Set to zero if not used.
* @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 Status
* @retval FALSE Failed to send the event
* @retval TRUE Event successul sent
*
*/
extern BOOL vscp_information_sendUpdatedEvent(uint8_t index, uint8_t zone, uint8_t subZone)
{
vscp_TxMessage txMsg;

vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_INFORMATION, VSCP_TYPE_INFORMATION_UPDATED, VSCP_PRIORITY_3_NORMAL);

txMsg.dataNum = 3;
txMsg.data[0] = index;
txMsg.data[1] = zone;
txMsg.data[2] = subZone;

return vscp_core_sendEvent(&txMsg);
}

/*******************************************************************************
LOCAL FUNCTIONS
*******************************************************************************/
Expand Down
13 changes: 13 additions & 0 deletions vscp/events/vscp_information.h
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,19 @@ extern BOOL vscp_information_sendRisingEvent(uint8_t index, uint8_t zone, uint8_
*/
extern BOOL vscp_information_sendFallingEvent(uint8_t index, uint8_t zone, uint8_t subZone);

/**
* Something has been updated.
*
* @param[in] index Index for device. Set to zero if not used.
* @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 Status
* @retval FALSE Failed to send the event
* @retval TRUE Event successul sent
*
*/
extern BOOL vscp_information_sendUpdatedEvent(uint8_t index, uint8_t zone, uint8_t subZone);

#endif /* __VSCP_INFORMATION_H__ */

/** @} */
35 changes: 35 additions & 0 deletions vscp/events/vscp_weather.c
Original file line number Diff line number Diff line change
Expand Up @@ -1373,6 +1373,41 @@ extern BOOL vscp_weather_sendArmageddonEvent(uint8_t index, uint8_t zone, uint8_
return vscp_core_sendEvent(&txMsg);
}

/**
* UV Index is an international scale for UV intensity which can have the range of 1-15 where 1 is
* very low radiation and a value over 10 is extremely high radiation.
*
* @param[in] index Index.
* @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.
* @param[in] uvIndex UV index (1-15)
* @return Status
* @retval FALSE Failed to send the event
* @retval TRUE Event successul sent
*
*/
extern BOOL vscp_weather_sendUvIndexEvent(uint8_t index, uint8_t zone, uint8_t subZone, uint8_t uvIndex)
{
vscp_TxMessage txMsg;

/* Invalid UV index? */
if ((1 > uvIndex) ||
(15 < uvIndex))
{
return FALSE;
}

vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_WEATHER, VSCP_TYPE_WEATHER_UV_INDEX, VSCP_PRIORITY_3_NORMAL);

txMsg.dataNum = 4;
txMsg.data[0] = index;
txMsg.data[1] = zone;
txMsg.data[2] = subZone;
txMsg.data[3] = uvIndex;

return vscp_core_sendEvent(&txMsg);
}

/*******************************************************************************
LOCAL FUNCTIONS
*******************************************************************************/
Expand Down
15 changes: 15 additions & 0 deletions vscp/events/vscp_weather.h
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,21 @@ extern BOOL vscp_weather_sendWarningLevel5Event(uint8_t index, uint8_t zone, uin
*/
extern BOOL vscp_weather_sendArmageddonEvent(uint8_t index, uint8_t zone, uint8_t subZone);

/**
* UV Index is an international scale for UV intensity which can have the range of 1-15 where 1 is
* very low radiation and a value over 10 is extremely high radiation.
*
* @param[in] index Index.
* @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.
* @param[in] uvIndex UV index (1-15)
* @return Status
* @retval FALSE Failed to send the event
* @retval TRUE Event successul sent
*
*/
extern BOOL vscp_weather_sendUvIndexEvent(uint8_t index, uint8_t zone, uint8_t subZone, uint8_t uvIndex);

#endif /* __VSCP_WEATHER_H__ */

/** @} */
35 changes: 35 additions & 0 deletions vscp/events/vscp_weather_forecast.c
Original file line number Diff line number Diff line change
Expand Up @@ -1373,6 +1373,41 @@ extern BOOL vscp_weather_forecast_sendArmageddonEvent(uint8_t index, uint8_t zon
return vscp_core_sendEvent(&txMsg);
}

/**
* UV Index is an international scale for UV intensity which can have the range of 1-15 where 1 is
* very low radiation and a value over 10 is extremely high radiation.
*
* @param[in] index Index.
* @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.
* @param[in] uvIndex UV index (1-15)
* @return Status
* @retval FALSE Failed to send the event
* @retval TRUE Event successul sent
*
*/
extern BOOL vscp_weather_forecast_sendUvIndexEvent(uint8_t index, uint8_t zone, uint8_t subZone, uint8_t uvIndex)
{
vscp_TxMessage txMsg;

/* Invalid UV index? */
if ((1 > uvIndex) ||
(15 < uvIndex))
{
return FALSE;
}

vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_WEATHER_FORECAST, VSCP_TYPE_WEATHER_FORECAST_UV_INDEX, VSCP_PRIORITY_3_NORMAL);

txMsg.dataNum = 4;
txMsg.data[0] = index;
txMsg.data[1] = zone;
txMsg.data[2] = subZone;
txMsg.data[3] = uvIndex;

return vscp_core_sendEvent(&txMsg);
}

/*******************************************************************************
LOCAL FUNCTIONS
*******************************************************************************/
Expand Down
15 changes: 15 additions & 0 deletions vscp/events/vscp_weather_forecast.h
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,21 @@ extern BOOL vscp_weather_forecast_sendWarningLevel5Event(uint8_t index, uint8_t
*/
extern BOOL vscp_weather_forecast_sendArmageddonEvent(uint8_t index, uint8_t zone, uint8_t subZone);

/**
* UV Index is an international scale for UV intensity which can have the range of 1-15 where 1 is
* very low radiation and a value over 10 is extremely high radiation.
*
* @param[in] index Index.
* @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.
* @param[in] uvIndex UV index (1-15)
* @return Status
* @retval FALSE Failed to send the event
* @retval TRUE Event successul sent
*
*/
extern BOOL vscp_weather_forecast_sendUvIndexEvent(uint8_t index, uint8_t zone, uint8_t subZone, uint8_t uvIndex);

#endif /* __VSCP_WEATHER_FORECAST_H__ */

/** @} */
4 changes: 2 additions & 2 deletions vscp/vscp_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ extern "C"
#define VSCP_CORE_VERSION_MINOR (10)

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

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

/** VSCP framework version string */
#define VSCP_CORE_FRAMEWORK_VERSION "v0.8.0"
#define VSCP_CORE_FRAMEWORK_VERSION "v0.9.0"

/*******************************************************************************
MACROS
Expand Down
3 changes: 3 additions & 0 deletions vscp/vscp_type_alarm.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ extern "C"
/** VSCP class 1 alarm type: Issued after an alarm system has been disarmed. */
#define VSCP_TYPE_ALARM_EMERGENCY_DISARM 11

/** VSCP class 1 alarm type: Issued when a watchdog has been triggered. */
#define VSCP_TYPE_ALARM_WATCHDOG 12

/*******************************************************************************
MACROS
*******************************************************************************/
Expand Down
3 changes: 3 additions & 0 deletions vscp/vscp_type_information.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ extern "C"
/** VSCP class 1 information type: A falling (edge) is detected. */
#define VSCP_TYPE_INFORMATION_FALLING 79

/** VSCP class 1 information type: Something has been updated. */
#define VSCP_TYPE_INFORMATION_UPDATED 80

/*******************************************************************************
MACROS
*******************************************************************************/
Expand Down
3 changes: 3 additions & 0 deletions vscp/vscp_type_weather.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ extern "C"
/** VSCP class 1 weather type: Armageddon */
#define VSCP_TYPE_WEATHER_ARMAGEDDON 51

/** VSCP class 1 weather type: UV index */
#define VSCP_TYPE_WEATHER_UV_INDEX 52

/*******************************************************************************
MACROS
*******************************************************************************/
Expand Down
3 changes: 3 additions & 0 deletions vscp/vscp_type_weather_forecast.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ extern "C"
/** VSCP class 1 weather forecast type: Armageddon */
#define VSCP_TYPE_WEATHER_FORECAST_ARMAGEDDON 51

/** VSCP class 1 weather type: UV index */
#define VSCP_TYPE_WEATHER_FORECAST_UV_INDEX 52

/*******************************************************************************
MACROS
*******************************************************************************/
Expand Down

0 comments on commit 2e49282

Please sign in to comment.