|
void | setSaveToSensor (boolean saveToSensor) |
|
void | sendMentalResilience (String question, double score, int question_id, int answer_id, String answer, Task.TYPE taskType) |
|
void | sendMentalResilience (String question, double score, int question_id, int answer_id, String answer, Task.TYPE taskType, long date) |
|
|
static final String | name = Sensors.getSENSOR_MENTAL_RESILIENCE() |
|
static final String | FIELD_QUESTION = "question" |
|
static final String | FIELD_ANSWER = "answer" |
|
static final String | FIELD_QUESTION_ID = "question_id" |
|
static final String | FIELD_ANSWER_ID = "answer_id" |
|
static final String | FIELD_SCORE = "score" |
|
static final String | FIELD_TASK_TYPE = "task_type" |
|
This class sends mental resilience data as the mental_resilience sensor to it's subscribers and optionally stores and uploads the data as sensor data in CommonSense.
- Date
- Oct 1 2014
- Author
- ted@s.nosp@m.ense.nosp@m.-os.n.nosp@m.l
static MentalResilienceSensor nl.sense_os.cortex.MentalResilienceSensor.getInstance |
( |
SensePlatform |
sensePlatform | ) |
|
|
static |
Get the instance of the mental resilience sensor.
By default the sensor data is not stored locally and not send to CommonSense.
- Parameters
-
sensePlatform | A binded sensePlatform object |
- Returns
- The initiated MentalResilienceSensor
void nl.sense_os.cortex.MentalResilienceSensor.sendMentalResilience |
( |
String |
question, |
|
|
double |
score, |
|
|
int |
question_id, |
|
|
int |
answer_id, |
|
|
String |
answer, |
|
|
Task.TYPE |
taskType |
|
) |
| |
Send the mental resilience value
This function sends the mental resilience value as sensor data to the subscribers.
If save to sensor is set to true it will be stored locally and send to CommonSense.
- Parameters
-
question | The question text |
score | The mental resilience value (e.g. 30) |
question_id | The identifier of the question (e.g. stylemsg_id) |
answer_id | The identifier of the answer (e.g. 2, for a 10 point scale 0-9) |
answer | The string representation of the answer (e.g. 30%) |
taskType | The Task.TYPE representing the domain to which this question belongs to (e.g. MR_TASK_DOMAIN_1) |
void nl.sense_os.cortex.MentalResilienceSensor.sendMentalResilience |
( |
String |
question, |
|
|
double |
score, |
|
|
int |
question_id, |
|
|
int |
answer_id, |
|
|
String |
answer, |
|
|
Task.TYPE |
taskType, |
|
|
long |
date |
|
) |
| |
Send the mental resilience value with a custom date
This function sends the mental resilience value as sensor data to the subscribers.
If save to sensor is set to true it will be stored locally and send to CommonSense.
- Parameters
-
question | The question text |
score | The mental resilience value (e.g. 30) |
question_id | The identifier of the question (e.g. stylemsg_id) |
answer_id | The identifier of the answer (e.g. 2, for a 10 point scale 0-9) |
answer | The string representation of the answer (e.g. 30%) |
taskType | The Task.TYPE representing the domain to which this question belongs to (e.g. MR_TASK_DOMAIN_1) |
date | The date of the sensor data point in epoch time stamp in ms |
void nl.sense_os.cortex.MentalResilienceSensor.setSaveToSensor |
( |
boolean |
saveToSensor | ) |
|
Set to save the data and send it to CommonSense
- Parameters
-
saveToSensor | If true the data is stored in a local buffer and send to CommonSense afterwards. If false it's only send to the subscribers of the sensor. |
The documentation for this class was generated from the following file:
- android-sdk/src/nl/sense_os/cortex/MentalResilienceSensor.java