Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
220 commits
Select commit Hold shift + click to select a range
5c1670a
Bug fixes and renaming of several classes
jason-watkins Jun 21, 2018
9b2ffa9
Combined support and framework libraries
jason-watkins Jun 28, 2018
608d4d0
Fixed build errors from rebase
jason-watkins Jul 10, 2018
cd28b13
Change clang-format rule for assignment alignment
jason-watkins Jul 11, 2018
25acb60
Add Prediction struct to Predictor.h
julianvu Jul 10, 2018
509a134
Resolve merge discrepancies causing build failure
julianvu Jul 11, 2018
8fa3068
Move Prediction struct outside of Predictor class
julianvu Jul 11, 2018
792d264
Apply clang-format
julianvu Jul 11, 2018
3ee5d51
Refactor setModel parameter to value in MCPredictor
julianvu Jul 11, 2018
1a40a63
Remove namespace qualifier from Prediction return value
julianvu Jul 11, 2018
fe17c3a
Fix parameter name in doc comment for MCPredictor
julianvu Jul 11, 2018
9777723
Add .travis.yml File
jason-watkins Jul 11, 2018
5dca1d7
Fix UData::point test (#24)
jason-watkins Jul 11, 2018
978e441
Made initialize method return state
jason-watkins Jul 16, 2018
1c7dcf6
Made stateEqn return new values
jason-watkins Jul 16, 2018
4a0d4d9
Fix missing state assignments
jason-watkins Jul 16, 2018
ccc5365
Made outputEqn return result
jason-watkins Jul 16, 2018
5416e12
Fix missing outputEqn assignment
jason-watkins Jul 16, 2018
41f49c3
Added type safety to model
jason-watkins Jul 17, 2018
9c90b2a
Fix test and warnings
jason-watkins Jul 17, 2018
690e62b
Fix test errors
jason-watkins Jul 17, 2018
940e116
Fix assert macros
jason-watkins Jul 17, 2018
5cf22e8
Update Factory and Observer interfaces
jason-watkins Jul 20, 2018
4839556
Organize ParticleFilter methods to match header
jason-watkins Jul 20, 2018
19506e5
Improve doc comments and add final modifier on ObsFactory
jason-watkins Jul 20, 2018
9a6c5f0
Rework Predictor API
jason-watkins Jul 20, 2018
272a27f
Increase delta on UKF test
jason-watkins Jul 20, 2018
b56d79d
Improve Factory doc comments
jason-watkins Jul 20, 2018
d349473
Renamed Assert to GSAP Assert
teubert Jul 21, 2018
f9e8466
Renamed GSAP Assert to Contracts
teubert Jul 22, 2018
975a482
Switch CMakeLists.txt files to spaces instead of tabs
jason-watkins Jul 22, 2018
00b12aa
Added a cmake install of the header/binary files and the example.
adam-sweet Jul 23, 2018
46935f5
Added Xcode build to travis-ci
teubert Jul 23, 2018
ddde727
Building templates (#32)
teubert Jul 23, 2018
a46f271
Move events to PrognosticsModel
jason-watkins Jul 24, 2018
f0e8de4
Fix EmptyPrognosticsModel template
jason-watkins Jul 24, 2018
a832b88
Added messaging code
jason-watkins Jul 23, 2018
80b5c3b
Add new contracts and make unimplemented serialization consistent
jason-watkins Jul 23, 2018
6f09b07
Fix missing payload serialization
jason-watkins Jul 23, 2018
d2381fc
Changed MessageIds to be consistent with eachother
jason-watkins Jul 24, 2018
019b7da
Add eventState UData vector to ProgEvent and make Predictor write to it
julianvu Jul 17, 2018
23aadbf
Add authorship and revise redundant doc comments in ProgEvent
julianvu Jul 24, 2018
4954bad
Add authorship and revise header comments
julianvu Jul 24, 2018
e4ec7ec
Refactor-remove ProgMeta class, uses, and tests
julianvu Jul 24, 2018
2a8c2fa
Refactor-remove ProgEvents class, uses, and tests
julianvu Jul 24, 2018
ffb76f5
Refactor-remove ProgData class, uses, and tests
julianvu Jul 25, 2018
bfa1a08
Refactor-remove CommManager class, uses, and tests
julianvu Jul 25, 2018
b3ce1d7
Fix indentation in CMakeLists
julianvu Jul 25, 2018
d6de9ed
Fix CommTests
jason-watkins Jul 25, 2018
be62203
Streamline test output
jason-watkins Jul 25, 2018
57a3536
Initial draft of EventDriven architecture
jason-watkins Jul 25, 2018
42785f6
Switch MessageWatcher to use map
jason-watkins Jul 25, 2018
41770c2
Add doc comments
jason-watkins Jul 25, 2018
58e9783
Fix template
jason-watkins Jul 25, 2018
e2500ff
Fix commented code section
jason-watkins Jul 25, 2018
04153c9
Streamline message subscription in EventDrivenPrecictor
jason-watkins Jul 26, 2018
1bb98fc
Fixed install after recent inc dir changes.
adam-sweet Jul 27, 2018
967a4c3
Added MessageBus and some MessageWatcher tests
jason-watkins Jul 26, 2018
2e82da1
Add EventDrivenObserver test
jason-watkins Jul 30, 2018
f926879
Add EventDrivenPredictorTests
jason-watkins Jul 30, 2018
161cb70
Add detail logging of test that ocassionaly fails on macOS
jason-watkins Jul 30, 2018
e9c0f97
Make MessageWatcher safe for async events
jason-watkins Aug 1, 2018
894c9c0
Remove redundant test class
jason-watkins Aug 1, 2018
a4826be
Initial draft of templatized messages
jason-watkins Aug 2, 2018
5bb13fb
Fix missing access modifier
jason-watkins Aug 2, 2018
265260e
Update OSX settings
jason-watkins Aug 3, 2018
672ea01
Refactor-remove includes() and replace usages with hasKey()
julianvu Jul 30, 2018
78eeea7
Make unordered map a property of ConfigMap instead of extending it
julianvu Jul 31, 2018
a358242
Fix ConfigMap usages to align with refactor
julianvu Jul 31, 2018
b46bc8f
Add requireKeys() to ConfigMap
julianvu Aug 1, 2018
4a6bfee
Refactor usages of GSAPConfigMap to ConfigMap::requireKeys()
julianvu Aug 1, 2018
6b0a4b6
Refactor GSAPConfigMap to ConfigMap in CommCollectionTests
julianvu Aug 1, 2018
da4c152
Add getters and setVector()
julianvu Aug 1, 2018
d94605d
Refactor requireKeys() to take const reference to ConfigMap
julianvu Aug 1, 2018
e79e937
Fix ConfigMapTests
julianvu Aug 1, 2018
3027675
Refactor-rename scalar getters to be less ambiguous
julianvu Aug 1, 2018
3cf9382
Fix CommTests.cpp to align with refactor
julianvu Aug 1, 2018
2c88a5b
Refactor setters to overloaded set() and fix tests to align
julianvu Aug 3, 2018
671385a
Refactor templates and tests to align with ConfigMap refactor
julianvu Aug 3, 2018
0b1e928
Refactor getters and setters and add unit tests for each
julianvu Aug 3, 2018
1165f87
Cleanup ProgEvent
jason-watkins Aug 3, 2018
cfb45d1
Add launch policy option to MessageBus
jason-watkins Aug 3, 2018
2e9fe73
Update tests to use message bus synchronization instead of delays and…
jason-watkins Aug 3, 2018
8bb46c1
Fix formatting
jason-watkins Aug 3, 2018
2fb1cce
Implemented Savepts (#50)
teubert Aug 3, 2018
c74f898
Dynamic Array improvements
jason-watkins Aug 5, 2018
c902aab
Move LoadEstimator code to folder (#53)
jason-watkins Aug 6, 2018
93b9663
Refactored LoadEstimator interface. (#54)
jason-watkins Aug 6, 2018
119b72a
Fix typos
jason-watkins Aug 8, 2018
62b4e83
Update Observer and Predictor, fix warnings
jason-watkins Aug 13, 2018
8b98612
Meganlim patch 2 (#47)
meganlim Aug 14, 2018
9d66856
Update EventDriven Observer/Predictor to prevent message queue backup…
jason-watkins Aug 16, 2018
c8118dd
Fix doc comment typos
jason-watkins Aug 16, 2018
0fa1295
Add coverage option to travis.yml (#60)
julianvu Aug 17, 2018
c5bc0cd
Added cmake install to the travis script.
adam-sweet Aug 23, 2018
69b3bd2
Add elment-wise negation operator to matrix
jason-watkins Aug 23, 2018
504d91f
Trigger exception propogation when removing completed futures
jason-watkins Aug 27, 2018
19fe31e
Add trace logging to event-driven predictor and MontecarloPredictor
jason-watkins Aug 27, 2018
8cead51
Fix multiple definitions of same variable
jason-watkins Aug 27, 2018
9a56475
Add logging to EventDrivenObserver (#65)
jason-watkins Aug 27, 2018
cf62601
Add trace logging to MessageBus (#66)
jason-watkins Aug 27, 2018
afb377e
More detailed loggin in EventDrivenObserver (#67)
jason-watkins Aug 27, 2018
d1de012
Tests and logging to try to track down PaaS issue (#69)
jason-watkins Aug 28, 2018
1ddabd7
Fix bug in EmptyMessage constructor
jason-watkins Aug 28, 2018
8d17ade
Removed Prognostics Model Input Equation (#74)
teubert Sep 4, 2018
f556954
Added additional Operators to Matrix Class (#72)
teubert Sep 4, 2018
a267278
Removed Observer getStateMean and GetOutputMean functions (#75)
teubert Sep 4, 2018
01a5fac
Trajectory Services and Savepoint Providers (#73)
teubert Sep 4, 2018
2ff3a2d
Add missing default virtual destructors (#76)
jason-watkins Sep 5, 2018
5cf7170
Propogate const for trajectory service and save point providers (#77)
jason-watkins Sep 5, 2018
f63afcd
Fix event driven predictor to include trajectory service
jason-watkins Sep 5, 2018
bc690cb
Fix possible dereference of end iterator in MC predictor (#79)
jason-watkins Sep 5, 2018
c17ec09
Add missing WSAStartup calls to TCPServer
jason-watkins Sep 5, 2018
f44decd
Fix network tests on Windows
jason-watkins Sep 5, 2018
6fd6ec4
Maybe fix macOS network test
jason-watkins Sep 5, 2018
ba305af
Add .appveyor.yml
jason-watkins Sep 5, 2018
ff68fc0
Fix test working directory
jason-watkins Sep 5, 2018
edab5de
Only test release config
jason-watkins Sep 5, 2018
2a23e73
Fix missing propogation of message timestamps (#82)
jason-watkins Sep 6, 2018
465231a
Code organization
jason-watkins Sep 6, 2018
1d09b62
Fix includes in TCPServer
jason-watkins Sep 6, 2018
6aac4f0
Fix template includes
jason-watkins Sep 6, 2018
4148ddf
Fix includes in ModelTests
jason-watkins Sep 6, 2018
ed0dcc5
Fix includes in Observer tests
jason-watkins Sep 6, 2018
553ee67
Reorganize code to minimize header bloat (#84)
jason-watkins Sep 7, 2018
9d9aca8
Remove message default-timestamp constructor (#85)
jason-watkins Sep 7, 2018
5a84f29
Add concatenation constructors to Matrix
jason-watkins Sep 10, 2018
3294c97
Update doc comments in matrix
jason-watkins Sep 11, 2018
68d92b6
Fix error in predictor and add test for predictor output
jason-watkins Sep 13, 2018
f5f8050
Messaging (#90)
jason-watkins Sep 13, 2018
6676fd3
Remove unneeded params in model classes, renamed model to systemModel
teubert Sep 14, 2018
5c49506
Updated CMakeLists
teubert Sep 14, 2018
4bfee06
Removed autoregistration of batterymodel
teubert Sep 14, 2018
e14a6fb
Apply clang-format
jason-watkins Sep 17, 2018
3b1d16f
Add battery registration to SystemModelFactory
jason-watkins Sep 17, 2018
944a979
Fixed Savepts and SysTrajectories (#91)
teubert Sep 17, 2018
f2a908f
Updates to expose data required by SWS metrics (#93)
jason-watkins Sep 19, 2018
02dd207
Add double constructor/cast for UData
jason-watkins Sep 19, 2018
e6cb024
Add tests
jason-watkins Sep 19, 2018
2ce11e6
Fix typo
jason-watkins Nov 30, 2018
d033da2
Fix tests
jason-watkins Nov 30, 2018
2581ee3
Reconfigure CMake to allow lib to be built on its own
jason-watkins Oct 22, 2018
2152b31
Move all install stuff to example CMakeLists
jason-watkins Oct 22, 2018
0d6ae48
Remove lib install command
jason-watkins Oct 22, 2018
b5a34f7
Remove install target from tavis build
jason-watkins Oct 24, 2018
079f13f
Maybe fix test config file paths
jason-watkins Nov 27, 2018
fcd5040
Fix appveyor config
jason-watkins Nov 27, 2018
0ca2663
Update ProgEvent to support start and end times and locations (#100)
jason-watkins Dec 7, 2018
97a04ea
Fix ID conflicts, add MessageWatcher logging, and update EventDrivenO…
jason-watkins Dec 7, 2018
47c4b5f
Fix typo (#102)
jason-watkins Dec 11, 2018
761cd4a
Simple sequential (non-event-driven) prognosers and removed ProgManag…
teubert Dec 14, 2018
1b4fd33
Event-Driven Prognosers (#104)
teubert Dec 20, 2018
6d71e00
Update ProgEvent to be more general (#105)
jason-watkins Dec 21, 2018
5006e80
Add batch reporting option to ED Predictor (#106)
jason-watkins Dec 21, 2018
7a8d820
Combine test executables (#107)
teubert Jan 29, 2019
0c8e942
Update examples for GSAP 1.2 (#108)
jason-watkins Jan 30, 2019
5f97c87
CMake updates
jason-watkins Jan 30, 2019
c89e6fd
Tweak test runner scripts
jason-watkins Jan 30, 2019
a659afa
Update travis.yml
jason-watkins Jan 30, 2019
7588626
More travis updates
jason-watkins Jan 30, 2019
a9f40f9
Tell lcov to shut up
jason-watkins Jan 30, 2019
9dd6a3e
Exclude test files from coverage
jason-watkins Jan 30, 2019
d4dc6c4
Add codecov config
jason-watkins Jan 30, 2019
bac092d
Remove Comms and Sockets
teubert Jan 30, 2019
781c95c
Remove unused Thread class
jason-watkins Feb 8, 2019
b0f046f
Make MessageClock::rep signed
jason-watkins Feb 11, 2019
8089855
Added Integration Tests & Fix for PF->MC (#111)
teubert Feb 11, 2019
ea24b3d
Rename "EventDriven" to "Async"
jason-watkins Feb 8, 2019
e74eb96
Fix header name
jason-watkins Feb 11, 2019
0974c7e
Fix class name
jason-watkins Feb 11, 2019
a76bc98
Fix all existing compiler warnings on Windows and Linux GCC/Clang (#114)
jason-watkins Feb 12, 2019
b6b84e6
Merging release branch changes into dev (#118)
teubert Sep 30, 2019
830e1ec
First Draft Centrifugal Pump Model
teubert Aug 17, 2019
462968e
Added Model to CMakeList
teubert Sep 26, 2019
fe247ba
Fixed order for CentrifugalPumpModel
teubert Sep 26, 2019
adadf9a
Added State Equation Test
teubert Sep 26, 2019
b91850a
Fixed Threshold met and Event State bug
teubert Sep 26, 2019
5972d0f
Added CV output and threshold test
teubert Sep 26, 2019
2aa9e3f
Minor fixes
teubert Oct 22, 2019
66b4ce7
Removed unnecessary manual noise type conversion
teubert Nov 26, 2019
a501938
Moved Threshold check forward
teubert Nov 26, 2019
f3c27ba
Moved distribution creation forward
teubert Nov 26, 2019
b31b934
Moved noise addition to Model.h
teubert Nov 26, 2019
3393cc5
Bug fix!
teubert Nov 26, 2019
33b574b
Fix tests
teubert Nov 26, 2019
e31ca31
Review fixes
teubert Nov 26, 2019
2dacaa1
Emplace_back fix
teubert Nov 26, 2019
bb0ecbd
Fixed templates (#123)
teubert Nov 27, 2019
b17a7d3
Caching params for battery (#124)
teubert Nov 29, 2019
4420d03
First EC Model (#125)
teubert Dec 2, 2019
9affcb5
Fixed typo in comment (#126)
teubert Jan 27, 2020
ddfa61c
Fix types (#127)
jason-watkins Feb 26, 2020
312d61d
Backport updates to the test header from SWS
jason-watkins Jun 9, 2020
04f9bcc
Removed unnecessary covariance get() (#132)
teubert Jul 23, 2020
ac6b500
Added Profile Load Estimator (#134)
teubert Jul 30, 2020
c20f201
Fixed bug in tests
teubert Feb 24, 2021
bf3d7dd
M_PI fix
teubert Feb 24, 2021
47911f2
Fixed Templates
teubert Feb 24, 2021
4b3ada6
Fixed matrix -Inf Test
teubert Feb 24, 2021
504100e
Fixed Load Estimator Tests
teubert Feb 25, 2021
ced3e37
Feature/merge models (#136)
teubert Feb 25, 2021
4fab973
Fixed Centrifugal Pump Model
teubert Oct 26, 2020
0ca9dd1
Updated SavePts & Added System State (#139)
teubert Mar 8, 2021
85150e6
Added median SOC calculation to simple example.
jfugate1 Mar 9, 2021
3388405
Update examples/simple/main.cpp
jfugate1 Mar 9, 2021
4c9ff00
Bugfix: Battery Indices (#141)
teubert Mar 17, 2021
8b65b4c
Updated MC to Save State when threshold is met (#143)
teubert Mar 23, 2021
3418d5e
Add Load Listener
teubert Sep 21, 2022
5918477
Apply suggestions from code review
teubert Sep 22, 2022
059d215
Typo in header flag
teubert Sep 22, 2022
d1d6828
Pointer to reference
teubert Sep 22, 2022
d89d2a7
Fix Async
teubert Sep 23, 2022
29c6db9
add EOD voltage component
teubert Sep 23, 2022
ae26118
Added getModel() method
teubert Mar 17, 2021
927d797
Remove .get
teubert Jan 30, 2023
2be7faa
Add Thermal Model
teubert Mar 23, 2021
04cbd73
Added printing temperature range to example
teubert Mar 23, 2021
280a864
improve example readability
teubert Jan 30, 2023
3e907b5
Make temperature parameters configurable
teubert Feb 2, 2023
4dbf024
fix tests
teubert Feb 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
image: Visual Studio 2017

platform:
- x64

configuration:
- Release

before_build:
- cd tests
- cmake -G "Visual Studio 15 2017 Win64" .

build:
project: $(APPVEYOR_BUILD_FOLDER)\tests\$(APPVEYOR_PROJECT_NAME)-tests.sln

test_script:
- 'cd %APPVEYOR_BUILD_FOLDER%\tests\bin'
- '.\tests.exe'
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ IndentWidth: 4
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: DontAlign
AlignOperands: true
Expand Down
19 changes: 19 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes
require_base: no # [yes :: must have a base report to post]
require_head: no # [yes :: must have a head report to post]
branches: null
coverage:
status:
project:
default:
target: auto
threshold: null
base: pr
patch:
default:
target: auto
threshold: null
base: pr
65 changes: 65 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
language: cpp

matrix:
include:
- name: "Linux/GCC"
os: linux
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- lcov
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
script:
- cmake -DCoverage=ON .. $GENERATOR
- cmake --build .
- lcov -q -c -i -d ./gsap -o coverage_base.info
- pushd bin
- ./tests
- popd
after_success:
# Create lcov report
- lcov -q -c -d ./gsap -o coverage_test.info
- lcov -q -a coverage_base.info -a coverage_test.info -o coverage.info
- lcov -q -r coverage.info '/usr/*' --o coverage.info # filter system-files
# Upload to CodeCov
- bash <(curl -s https://codecov.io/bash) -f coverage.info
- name: "Linux/Clang"
os: linux
compiler: clang
addons:
apt:
sources:
- llvm-toolchain-trusty-5.0
packages:
- clang-5.0
env:
- MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"
- name: "macOS/Clang"
os: osx
compiler: clang
env:
- MATRIX_EVAL=""
- name: "macOS/Xcode"
os: osx
env:
- MATRIX_EVAL="GENERATOR='-G Xcode'"

before_install:
- eval "${MATRIX_EVAL}"

before_script:
- pushd tests
- mkdir build
- pushd build

script:
- cmake .. $GENERATOR
- cmake --build .
- pushd bin
- ./tests
- popd
226 changes: 114 additions & 112 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,124 +1,126 @@
cmake_minimum_required(VERSION 2.8)

project(GSAP)

set(CMAKE_BINARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/bin/)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})

# Build option for enabling compiler and linker flags for gathering coverage data
# In command line, set option this way:
# cmake -DCoverage=ON <build folder>
# Build option for enabling compiler and linker flags for gathering coverage data
# In command line, set option this way:
# cmake -DCoverage=ON <build folder>
option(Coverage "Coverage" OFF)

if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
# -g: Produce debugging information
# -O3: Optimize as much as possible while remaning standards compliant
# -O0: Disable optimizations
# -std: Determine the language standard.
# -Wall: Enables all the warnings about constructions that some users consider questionable
# -Wcast-qual: Warn whenever a pointer is cast so as to remove a type qualifier from the target type
# -Werror: Make all warnings into errors
# -Weffc++: Warn about violations of some guidelines from Scott Meyers' Effective C++ (Note 2016-07-13: Currently removed because it warns about some things that are perfectly safe)
# -Wextra: Enables some extra warning flags that are not enabled by -Wall
# -Wfloat-equal: Warn if floating-point values are used in equality comparisons.
# -Wformat: Check calls to printf and scanf, etc.
# -Winline: Warn if a function that is declared as inline cannot be inlined
# -Wold-style-cast: Warn on C-style casts
# -Wpedantic: Issue all the warnings demanded by strict ISO C and ISO C++
# -Wshadow: Warn whenever a local variable or type declaration shadows another variable, parameter, type, or class member
# -Wsign-conversion: Warn for implicit conversions that may change the sign of an integer value
# -Wswitch-default: Warn whenever a switch statement does not have a default case.
# -Wno-unknown-pragmas: (2016-07-13) Temporarily added to disable warnings about #pragma unused
set(CMAKE_CXX_FLAGS "-std=c++11 -pthread")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstrict-aliasing")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wcast-qual -Wextra -Wfloat-equal")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wold-style-cast -Wpedantic -Wshadow")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsign-conversion -Wswitch-default -Wno-unknown-pragmas")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Winline")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Werror")
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
# -g: Produce debugging information
# -O3: Optimize as much as possible while remaning standards compliant
# -Og: Enable optimizations that don't interfere with debugging
# -std: Determine the language standard.
# -Wall: Enables all the warnings about constructions that some users consider questionable
# -Wcast-qual: Warn whenever a pointer is cast so as to remove a type qualifier from the target type
# -Werror: Make all warnings into errors
# -Weffc++: Warn about violations of some guidelines from Scott Meyers' Effective C++ (Note 2016-07-13: Currently removed because it warns about some things that are perfectly safe)
# -Wextra: Enables some extra warning flags that are not enabled by -Wall
# -Wfloat-equal: Warn if floating-point values are used in equality comparisons.
# -Wformat: Check calls to printf and scanf, etc.
# -Winline: Warn if a function that is declared as inline cannot be inlined
# -Wold-style-cast: Warn on C-style casts
# -Wpedantic: Issue all the warnings demanded by strict ISO C and ISO C++
# -Wshadow: Warn whenever a local variable or type declaration shadows another variable, parameter, type, or class member
# -Wsign-conversion: Warn for implicit conversions that may change the sign of an integer value
# -Wswitch-default: Warn whenever a switch statement does not have a default case.
# -Wno-unknown-pragmas: (2016-07-13) Temporarily added to disable warnings about #pragma unused
set(CMAKE_CXX_FLAGS "-std=c++11 -pthread")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstrict-aliasing")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wcast-qual -Wextra -Wfloat-equal")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wold-style-cast -Wpedantic -Wshadow")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsign-conversion -Wswitch-default -Wno-unknown-pragmas")

if(Coverage)
# If coverage option enabled, set compiler and linker flags to gather coverage data
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
set(CMAKE_EXE_LINKER_FLAGS "-lgcov")
endif()

set(CMAKE_CXX_FLAGS_DEBUG "-g -Og -Winline")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Werror")
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
# /EHsc: Specifies the model of exception handling.
# /GL: Enables whole program optimization.
# /Gm: Enables minimal rebuild.
# /GS: Buffers security check.
# /MD: Creates a multithreaded DLL using MSVCRT.lib.
# /MDd: Creates a debug multithreaded DLL using MSVCRTD.lib.
# /O2: Creates fast code.
# /Od: Disables optimization.
# /Oi: Generates intrinsic functions.
# /RTC1: Enables run-time error checking.
# /sdl: Enables additional (Windows-specific) security features and warnings.
# /W4: Sets which warning level to output.
# /wd: Disable warning
# /Zi: Generates complete debugging information.
set(CMAKE_CXX_FLAGS "/EHsc /GS /sdl- /W4 /wd\"4996\" /Zi")
set(CMAKE_CXX_FLAGS_DEBUG "/Gm /MDd /Od /RTC1")
set(CMAKE_CXX_FLAGS_RELEASE "/GL /Gm- /MD /O2 /Oi")
else()
message(FATAL_ERROR "${CMAKE_CXX_COMPILER_ID} is not recognized.")
endif()

# Check command line to see if OpenMP is to be used.
option(UseOpenMP "UseOpenMP" FALSE)

# Build with OpenMP if desired, and package can be found.
if (UseOpenMP)
message(STATUS "Attempting to find OpenMP package...")
find_package(OpenMP)
if (OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
message(STATUS "Attempting to find OpenMP package...")
find_package(OpenMP)
if (OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D USING_OPENMP")
message(STATUS "Added OpenMP to buildsystem")
else()
message(FATAL_ERROR "Command line asked for OpenMP, but package couldn't be found!")
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D USING_OPENMP")
message(STATUS "Added OpenMP to buildsystem")
else()
message(FATAL_ERROR "Command line asked for OpenMP, but package couldn't be found!")
endif()
endif()

#Libraries
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/support/)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/framework/)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Test/)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/example/)
set(HEADERS
inc/BenchmarkTimer.h
inc/CompositeSavePointProvider.h
inc/ConfigMap.h
inc/Contracts.h
inc/DataPoint.h
inc/DataPoints.h
inc/DataStore.h
inc/Datum.h
inc/DynamicArray.h
inc/AsyncPrognoser.h
inc/AsyncPrognoserBuilder.h
inc/Exceptions.h
inc/Factory.h
inc/GaussianVariable.h
inc/ISavePointProvider.h
inc/Loading/ConstLoadEstimator.h
inc/Loading/LoadEstimator.h
inc/Loading/LoadEstimatorFactory.h
inc/Loading/MovingAverageLoadEstimator.h
inc/Loading/ProfileLoadEstimator.h
inc/Matrix.h
inc/Messages/IMessageProcessor.h
inc/Messages/IMessagePublisher.h
inc/Messages/Message.h
inc/Messages/MessageBus.h
inc/Messages/MessageClock.h
inc/Messages/MessageId.h
inc/Messages/MessageWatcher.h
inc/Messages/ProgEventMessage.h
inc/Messages/UDataMessage.h
inc/Messages/WaypointMessage.h
inc/ModelBasedAsyncPrognoserBuilder.h
inc/ModelBasedPrognoser.h
inc/Models/BatteryModel.h
inc/Models/CentrifugalPumpModel.h
inc/Models/CircuitBatteryModel.h
inc/Models/PrognosticsModel.h
inc/Models/PrognosticsModelFactory.h
inc/Observers/AsyncObserver.h
inc/Observers/Observer.h
inc/Observers/ObserverFactory.h
inc/Observers/ParticleFilter.h
inc/Observers/UnscentedKalmanFilter.h
inc/Predictors/AsyncPredictor.h
inc/Predictors/MonteCarloPredictor.h
inc/Predictors/Predictor.h
inc/Predictors/PredictorFactory.h
inc/PContainer.h
inc/Point3D.h
inc/ProgEvent.h
inc/Prognoser.h
inc/PrognoserFactory.h
inc/Singleton.h
inc/StatisticalTools.h
inc/StringUtils.h
inc/Trajectory/AsyncTrajectoryService.h
inc/Trajectory/ITrajectoryCorrelator.h
inc/Trajectory/TrajectoryService.h
inc/ThreadSafeLog.h
inc/UData.h
inc/UDataInterfaces.h
)

set(SRCS
src/ConfigMap.cpp
src/DataPoint.cpp
src/DataPoints.cpp
src/AsyncPrognoserBuilder.cpp
src/GaussianVariable.cpp
src/Loading/ConstLoadEstimator.cpp
src/Loading/GaussianLoadEstimator.cpp
src/Loading/MovingAverageLoadEstimator.cpp
src/Loading/ProfileLoadEstimator.cpp
src/Matrix.cpp
src/Messages/EmptyMessage.cpp
src/Messages/Message.cpp
src/Messages/MessageBus.cpp
src/Messages/MessageId.cpp
src/Messages/WaypointMessage.cpp
src/ModelBasedAsyncPrognoserBuilder.cpp
src/ModelBasedPrognoser.cpp
src/Models/BatteryModel.cpp
src/Models/CircuitBatteryModel.cpp
src/Models/CentrifugalPumpModel.cpp
src/Observers/AsyncObserver.cpp
src/Observers/ParticleFilter.cpp
src/Observers/UnscentedKalmanFilter.cpp
src/PContainer.cpp
src/Predictors/AsyncPredictor.cpp
src/Predictors/MonteCarloPredictor.cpp
src/StatisticalTools.cpp
src/ThreadSafeLog.cpp
src/Trajectory/AsyncTrajectoryService.cpp
src/Trajectory/TrajectoryService.cpp
src/UData.cpp
src/UDataInterfaces.cpp
)

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/inc/)
add_library(gsap ${HEADERS} ${SRCS})
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ here](https://github.com/nasa/GSAP/wiki)** </div></font>
The Generic Software Architecture for Prognostics (GSAP) is a framework for
applying prognostics. It makes applying prognostics easier by implementing many
of the common elements across prognostic applications. The standard interface
enables reuse of prognostic algorithms and models across using the GSAP
enables reuse of prognostic algorithms and models across using the GSAP
framework.

There are two operational modes for GSAP: 'async' and 'simple'. These are both described below:
* 'async': Asynchronous GSAP. This takes advantage of parallization, including automatic thread management to perform calculations on multiple threads.
* 'simple': Simple single-threaded GSAP. Resulting prognostics application is smaller and simplier, but does not take advantage of multi-threading. Ideal for resource constrained hardware.

![GSAP Layers](images/Layers.png)

The GSAP framework is used through the creation of communicators, prognosers, or
Expand All @@ -19,7 +23,7 @@ described further below:

* **Communicators**:

Communicators are used to communicate data with the outside world. These
Communicators are used to communicate data with the outside world. These
function as interfaces with various data sources and sinks. Some examples could
be a playback agent that reads from a file, a GUI for displaying prognostic
results, an automated report generator, or a client that connects into a network
Expand Down Expand Up @@ -59,7 +63,7 @@ All contributions are welcome! If you are having problems with the plugin, pleas

## Notices

Copyright ©2016-2018 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All Rights Reserved.
Copyright ©2016, 2019 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All Rights Reserved.

No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY OF
ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED
Expand Down
Loading