Door controller and proximity switch detection.

Dependencies:   mbed-rtos mbed VodafoneUSBModem_bleedingedge

This program takes in a digital input - which is a reed switch for a door - and an output to a relay. The door is open with a simple 'text' to the modem on the USB bus (i used k3770 vodafone dongle).

The door will send an alarm message to your nominated numbers at the start of the program if the door is open without a command being sent.

Very simple - and just meant as a demonstration of how to incorporate GSM/3G functionality to a evice.

Committer:
nherriot
Date:
Sun Feb 10 20:28:33 2013 +0000
Revision:
26:b9a0fa0f2469
Parent:
21:7068b39d3006
Parent:
23:28b693d586ee
Child:
27:a265d336f088
2nd attempt at merging -- this is not as easy as it use to be!

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nherriot 0:5136cdfaebd0 1 /* net_sms_test.cpp */
nherriot 0:5136cdfaebd0 2 /*
nherriot 0:5136cdfaebd0 3 Copyright (C) 2012 ARM Limited.
nherriot 0:5136cdfaebd0 4
nherriot 0:5136cdfaebd0 5 Permission is hereby granted, free of charge, to any person obtaining a copy of
nherriot 0:5136cdfaebd0 6 this software and associated documentation files (the "Software"), to deal in
nherriot 0:5136cdfaebd0 7 the Software without restriction, including without limitation the rights to
nherriot 0:5136cdfaebd0 8 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
nherriot 0:5136cdfaebd0 9 of the Software, and to permit persons to whom the Software is furnished to do
nherriot 0:5136cdfaebd0 10 so, subject to the following conditions:
nherriot 0:5136cdfaebd0 11
nherriot 0:5136cdfaebd0 12 The above copyright notice and this permission notice shall be included in all
nherriot 0:5136cdfaebd0 13 copies or substantial portions of the Software.
nherriot 0:5136cdfaebd0 14
nherriot 0:5136cdfaebd0 15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
nherriot 0:5136cdfaebd0 16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
nherriot 0:5136cdfaebd0 17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
nherriot 0:5136cdfaebd0 18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
nherriot 0:5136cdfaebd0 19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
nherriot 0:5136cdfaebd0 20 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
nherriot 0:5136cdfaebd0 21 SOFTWARE.
nherriot 0:5136cdfaebd0 22 */
nherriot 0:5136cdfaebd0 23
nherriot 0:5136cdfaebd0 24 #define __DEBUG__ 4 //Maximum verbosity
nherriot 0:5136cdfaebd0 25 #ifndef __MODULE__
nherriot 26:b9a0fa0f2469 26 //#define __MODULE__ "net_voda_k3770_test.cpp"
nherriot 0:5136cdfaebd0 27 #endif
nherriot 0:5136cdfaebd0 28
nherriot 22:87d73be30243 29 #define MY_PHONE_NUMBER "+447717275049" // Nicholas' Number
nherriot 22:87d73be30243 30 #define BACKUP_NUMBER "+447825608771" // Ashleys Number
nherriot 0:5136cdfaebd0 31
donatien 21:7068b39d3006 32 //#include "core/fwk.h"
nherriot 0:5136cdfaebd0 33 #include "mbed.h"
nherriot 0:5136cdfaebd0 34 #include "rtos.h"
nherriot 10:c8a6f2822068 35 #include "VodafoneUSBModem.h"
nherriot 0:5136cdfaebd0 36
nherriot 2:bcc9256ecaab 37 #include <string>
nherriot 2:bcc9256ecaab 38
nherriot 0:5136cdfaebd0 39 extern "C" void HardFault_Handler() {
nherriot 0:5136cdfaebd0 40 error("Hard Fault!\n");
nherriot 0:5136cdfaebd0 41 }
nherriot 0:5136cdfaebd0 42
nherriot 8:1b4e84f4c451 43 DigitalOut led1(LED1); // LED 1 is used to show the state of the door. ON is door open, and OFF is door close.
nherriot 16:9245c3a37491 44 DigitalOut led2(LED2); // LED 2 is used to indicate that the main process is still running.
nherriot 8:1b4e84f4c451 45 DigitalOut led3(LED3); // LED 3 is use to indicate if the relay is being switched on to open the door
nherriot 22:87d73be30243 46 DigitalOut led4(LED4); // LED 4 indicate the state of the ALARM - If it's on the door is armed.
nherriot 8:1b4e84f4c451 47 DigitalOut doorContactorRelay(p5); // create a digital pin object to control the door contactor relay
nherriot 11:769f2b28b236 48 DigitalIn doorProximitySwitch(p6); // create a digital pin object to sense door position proximity switch, this works in reverse
nherriot 8:1b4e84f4c451 49 // the switch senses positive when the door is closed - need to be sure when it's closed! :-)
nherriot 8:1b4e84f4c451 50 bool openTheDoor = false; // create a state variable which is set to indicate the mbed should open the door
nherriot 8:1b4e84f4c451 51 // this variable will be used hold the latch open until it knows the door has been open.
nherriot 15:262da03e3e20 52 bool detectRegState = true; // this boolean variable will force the while loop to detect reg state - if the connection manager
nherriot 22:87d73be30243 53 // is not registered it will stay in this 'detec' phase for ever.
nherriot 22:87d73be30243 54 bool alarmActive = false; // this alarm flag will only be true if the door is open - but no signal has been detected
nherriot 22:87d73be30243 55 // to open the door. in other words there is a break in!
nherriot 22:87d73be30243 56 bool closeTheDoor = false; // this flag is used when the door is in an open legal state. once it's closed after a legal state
nherriot 22:87d73be30243 57 // it will set the alarm to active.
nherriot 22:87d73be30243 58
nherriot 22:87d73be30243 59
nherriot 10:c8a6f2822068 60 int read_digital(void) {
nherriot 10:c8a6f2822068 61 DigitalIn mydigital(p6);
nherriot 10:c8a6f2822068 62 return(mydigital.read());
nherriot 10:c8a6f2822068 63 }
nherriot 0:5136cdfaebd0 64
nherriot 0:5136cdfaebd0 65 void test(void const*) {
nherriot 0:5136cdfaebd0 66
nherriot 22:87d73be30243 67 DBG("Hello world and Vodafone Connection Manager test program!");
nherriot 22:87d73be30243 68 DBG("Waiting 30 seconds for modem to settle down");
nherriot 23:28b693d586ee 69 Thread::wait(10000);
nherriot 23:28b693d586ee 70 VodafoneUSBModem connectionManager; // create a connection manager object
nherriot 0:5136cdfaebd0 71
nherriot 10:c8a6f2822068 72 char num[17]; // create a buffer to hold the telephone number in
nherriot 10:c8a6f2822068 73 char msg[160]; // create a buffer to hold the text message in
nherriot 10:c8a6f2822068 74 size_t count;
nherriot 15:262da03e3e20 75 LinkMonitor::REGISTRATION_STATE regState = LinkMonitor::REGISTRATION_STATE_UNKNOWN; // an enum to hold the registration state of the connection manager
nherriot 15:262da03e3e20 76 LinkMonitor::BEARER bearer = LinkMonitor::BEARER_UNKNOWN; // an enum to hold the type of bearer established by the connection manager
nherriot 15:262da03e3e20 77 int rssi = -1000; // a signal strength indicator variable - set to a very default low value.
nherriot 15:262da03e3e20 78
nherriot 22:87d73be30243 79 // this is a fudge to let the modem settle down - we wait for 30 seconds
nherriot 23:28b693d586ee 80
nherriot 22:87d73be30243 81 DBG("Wait over - initialising the modem manager");
nherriot 23:28b693d586ee 82
nherriot 23:28b693d586ee 83
nherriot 23:28b693d586ee 84
nherriot 17:9b57d29e2eab 85 int ret = connectionManager.getLinkState(&rssi, &regState, &bearer);
donatien 21:7068b39d3006 86
nherriot 16:9245c3a37491 87 // LinkMonitor::REGISTRATION_STATE regState = LinkMonitor::REGISTRATION_STATE_HOME_NETWORK;
nherriot 16:9245c3a37491 88
nherriot 15:262da03e3e20 89 // before we do anything we need to make sure we have a connection to a network.
nherriot 15:262da03e3e20 90 // so let us check that first!
nherriot 15:262da03e3e20 91
nherriot 16:9245c3a37491 92
nherriot 15:262da03e3e20 93 while(detectRegState)
nherriot 15:262da03e3e20 94 {
nherriot 17:9b57d29e2eab 95 if (detectRegState ==1)
nherriot 15:262da03e3e20 96 {
nherriot 15:262da03e3e20 97 if(rssi==-1000)
nherriot 15:262da03e3e20 98 {
nherriot 15:262da03e3e20 99 DBG("Checking signal strength - RSSI: Error.");
nherriot 15:262da03e3e20 100 }
nherriot 15:262da03e3e20 101 else
nherriot 15:262da03e3e20 102 {
nherriot 15:262da03e3e20 103 DBG("Signal strength is: RSSI: %d",rssi);
nherriot 15:262da03e3e20 104 }
nherriot 15:262da03e3e20 105
nherriot 15:262da03e3e20 106 switch(regState)
nherriot 15:262da03e3e20 107 {
nherriot 15:262da03e3e20 108 case LinkMonitor::REGISTRATION_STATE_UNKNOWN:
nherriot 15:262da03e3e20 109 DBG("regState: UNKNOWN. Failing.");
nherriot 15:262da03e3e20 110 break;
nherriot 15:262da03e3e20 111 case LinkMonitor::REGISTRATION_STATE_REGISTERING:
nherriot 15:262da03e3e20 112 DBG("regState: REGISTERING");
nherriot 15:262da03e3e20 113 break;
nherriot 15:262da03e3e20 114 case LinkMonitor::REGISTRATION_STATE_DENIED:
nherriot 15:262da03e3e20 115 DBG("regState: DENIED");
nherriot 15:262da03e3e20 116 break;
nherriot 15:262da03e3e20 117 case LinkMonitor::REGISTRATION_STATE_NO_SIGNAL:
nherriot 15:262da03e3e20 118 DBG("regState: NO SIGNAL");
nherriot 15:262da03e3e20 119 break;
nherriot 23:28b693d586ee 120 case HARDWARE_NO_RESPONSE:
nherriot 23:28b693d586ee 121 DBG("Looks like there is no modem inserted, or power to the modem module has failed?");
nherriot 23:28b693d586ee 122 break;
nherriot 15:262da03e3e20 123 case LinkMonitor::REGISTRATION_STATE_HOME_NETWORK:
nherriot 15:262da03e3e20 124 detectRegState = false;
nherriot 15:262da03e3e20 125 DBG("regState: HOME NETWORK");
nherriot 15:262da03e3e20 126 break;
nherriot 15:262da03e3e20 127 case LinkMonitor::REGISTRATION_STATE_ROAMING:
nherriot 15:262da03e3e20 128 detectRegState = false;
nherriot 15:262da03e3e20 129 DBG("regState: ROAMING");
nherriot 15:262da03e3e20 130 break;
nherriot 15:262da03e3e20 131 default:
nherriot 15:262da03e3e20 132 DBG("regState: ERROR. Failing.");
nherriot 17:9b57d29e2eab 133
nherriot 15:262da03e3e20 134 }
nherriot 15:262da03e3e20 135 }
nherriot 16:9245c3a37491 136 Thread::wait(500);
nherriot 23:28b693d586ee 137 int ret = connectionManager.getLinkState(&rssi, &regState, &bearer);
nherriot 15:262da03e3e20 138 }
nherriot 15:262da03e3e20 139
nherriot 22:87d73be30243 140 // let the boss man know I'm alive and entering my main loop
nherriot 22:87d73be30243 141 ret = connectionManager.sendSM(MY_PHONE_NUMBER, "Hello from Vodafone door controller 2013 - Alarm Active");
nherriot 22:87d73be30243 142 ret = connectionManager.sendSM(BACKUP_NUMBER, "Hello from Vodafone door controller 2013- Alarm Active");
nherriot 26:b9a0fa0f2469 143
nherriot 22:87d73be30243 144 // better let the boss know that I'm on a roamed network as this could cost some money! or present some routing problems
nherriot 22:87d73be30243 145 if (regState==LinkMonitor::REGISTRATION_STATE_ROAMING)
nherriot 22:87d73be30243 146 {
nherriot 22:87d73be30243 147 //ret = connectionManager.sendSM(MY_PHONE_NUMBER, "Warning sir - I'm on a roamed network!");
nherriot 22:87d73be30243 148 ret = connectionManager.sendSM(BACKUP_NUMBER, "Warning sir - I'm on a roamed network!");
nherriot 22:87d73be30243 149 }
nherriot 22:87d73be30243 150
nherriot 10:c8a6f2822068 151
nherriot 10:c8a6f2822068 152
nherriot 0:5136cdfaebd0 153 while(true)
nherriot 0:5136cdfaebd0 154 {
nherriot 8:1b4e84f4c451 155
nherriot 8:1b4e84f4c451 156 // if this state variable has been set I need to keep the doorContactor on until the door is open
nherriot 15:262da03e3e20 157 if ((openTheDoor) && (read_digital() == 0))
nherriot 3:0a8eebcb0acf 158 {
nherriot 15:262da03e3e20 159 DBG("The door is open now and I'm switching off the relay and reseting the state variable");
nherriot 8:1b4e84f4c451 160 doorContactorRelay = 0; // door must be open now so switch relay off.
nherriot 8:1b4e84f4c451 161 openTheDoor = false; // the door is open now so set it to false.
nherriot 8:1b4e84f4c451 162 led3 = 0; // switch the LED light off to indicate I'm switching the relay off
nherriot 22:87d73be30243 163 closeTheDoor = true; // now set the flag to indicate we are waiting for a closed door event allowing us to then activate the alarm
nherriot 22:87d73be30243 164 DBG("The closeTheDoor is now set to TRUE");
nherriot 8:1b4e84f4c451 165
nherriot 8:1b4e84f4c451 166 }
nherriot 3:0a8eebcb0acf 167
nherriot 22:87d73be30243 168 if ((read_digital() != 0) && ( closeTheDoor == true))
nherriot 22:87d73be30243 169 {
nherriot 22:87d73be30243 170 closeTheDoor = false; // the door is now closed after a legal open so reset the flag
nherriot 22:87d73be30243 171 alarmActive = true; // OK we can now activate the ALARM again
nherriot 22:87d73be30243 172 led4 = 1; // switch the alarm light on
nherriot 22:87d73be30243 173 DBG("The door is now closed after an open and the ALARM is no re-activated");
nherriot 22:87d73be30243 174
nherriot 22:87d73be30243 175 }
nherriot 22:87d73be30243 176
nherriot 22:87d73be30243 177 // check to see if the door is open and the alarm is on - if it is send warning message - but just once!!!!
nherriot 22:87d73be30243 178 if ((read_digital() == 0) && (alarmActive == true))
nherriot 22:87d73be30243 179 {
nherriot 22:87d73be30243 180 DBG("The door is now open - but the ALARM is active - send emergency text to warn our boss!");
nherriot 22:87d73be30243 181 DBG("*******************************************************************");
nherriot 22:87d73be30243 182 DBG("WARNING - WARNING - WARNING - WARNING - WARNING - WARNING - WARNING");
nherriot 22:87d73be30243 183 DBG("*******************************************************************");
nherriot 22:87d73be30243 184 alarmActive = false; // set the alarm off as we don't want to keep sending text messages
nherriot 22:87d73be30243 185 led4 = 0; // set the alarm light to off
nherriot 22:87d73be30243 186 connectionManager.sendSM(BACKUP_NUMBER, "ALARM - ALARM - ALARM - Your door is open but I've not received an 'open' command!!!" );
nherriot 22:87d73be30243 187 connectionManager.sendSM(MY_PHONE_NUMBER, "ALARM - ALARM - ALARM - Your door is open but I've not received an 'open' command!!!" );
nherriot 22:87d73be30243 188
nherriot 22:87d73be30243 189 }
nherriot 22:87d73be30243 190
nherriot 22:87d73be30243 191 // check to see that the door is closed and the alarm can be reset. this will happen if the openTheDoor state variable
nherriot 22:87d73be30243 192 // is FALSE (indicating that the system is not trying to hold the relay open to allow accesss, the door is closed and the ALARM is false
nherriot 22:87d73be30243 193 if ((openTheDoor == false) && (read_digital() !=0) && (alarmActive == false))
nherriot 22:87d73be30243 194 {
nherriot 22:87d73be30243 195 DBG("Resetting the ALARM to active again");
nherriot 22:87d73be30243 196 alarmActive = true; // set the alarm on as the door is closed again
nherriot 22:87d73be30243 197 led4 = 1;
nherriot 22:87d73be30243 198 }
nherriot 22:87d73be30243 199
nherriot 22:87d73be30243 200
nherriot 8:1b4e84f4c451 201 // check the state of the door and switch the LED light to 'ON' for door open and 'OFF' for door closed.
nherriot 10:c8a6f2822068 202 //if (doorProximitySwitch.read() == 0)
nherriot 10:c8a6f2822068 203 if (read_digital() == 0)
nherriot 8:1b4e84f4c451 204 {
nherriot 15:262da03e3e20 205 // DBG("The door proximity switch is: %d so I think it's open", doorProximitySwitch.read() );
nherriot 8:1b4e84f4c451 206 led1 = 1;
nherriot 3:0a8eebcb0acf 207 }
nherriot 8:1b4e84f4c451 208 else
nherriot 8:1b4e84f4c451 209 {
nherriot 15:262da03e3e20 210 // DBG("The door proximity switch is: %d so I think it's closed", doorProximitySwitch.read() );
nherriot 8:1b4e84f4c451 211 led1 = 0;
nherriot 8:1b4e84f4c451 212 }
nherriot 8:1b4e84f4c451 213
nherriot 8:1b4e84f4c451 214
nherriot 8:1b4e84f4c451 215
nherriot 7:316c2dac06a5 216 int ret = connectionManager.getSMCount(&count); // check to see if there is an incoming SMS message
nherriot 0:5136cdfaebd0 217 if(ret)
nherriot 0:5136cdfaebd0 218 {
nherriot 0:5136cdfaebd0 219 WARN("getSMCount returned %d", ret);
nherriot 10:c8a6f2822068 220 Thread::wait(125);
nherriot 0:5136cdfaebd0 221 continue;
nherriot 0:5136cdfaebd0 222 }
nherriot 10:c8a6f2822068 223
nherriot 23:28b693d586ee 224 // DBG("The SMS count is now at: %d for this modem", count);
nherriot 7:316c2dac06a5 225 if( count > 0) // if there are messages in the mailbox start pulling them off the queue
nherriot 0:5136cdfaebd0 226 {
nherriot 0:5136cdfaebd0 227 DBG("%d SMS to read", count);
nherriot 10:c8a6f2822068 228 ret = connectionManager.getSM(num, msg, 160);
nherriot 8:1b4e84f4c451 229
nherriot 0:5136cdfaebd0 230 if(ret)
nherriot 0:5136cdfaebd0 231 {
nherriot 0:5136cdfaebd0 232 WARN("getSM returned %d", ret);
nherriot 10:c8a6f2822068 233 Thread::wait(125);
nherriot 0:5136cdfaebd0 234 continue;
nherriot 0:5136cdfaebd0 235 }
nherriot 0:5136cdfaebd0 236
nherriot 6:5a892c3d738e 237 DBG("The message is from number: %s and the message is: \"%s\"", num, msg);
nherriot 6:5a892c3d738e 238
nherriot 15:262da03e3e20 239 // if the SMS is from your own number, ignore it!
nherriot 15:262da03e3e20 240 if(strcmp(num,"+447785666088")==0)
nherriot 15:262da03e3e20 241 {
nherriot 15:262da03e3e20 242 DBG("The message appears to be from my MSISDN number: %s, I'll do nothing.", num);
nherriot 15:262da03e3e20 243 continue;
nherriot 15:262da03e3e20 244 }
nherriot 15:262da03e3e20 245
nherriot 15:262da03e3e20 246
nherriot 15:262da03e3e20 247
nherriot 15:262da03e3e20 248 if ((strcmp (msg, "open") ==0)|| (strcmp(num,"TrackaPhone")==0))
nherriot 8:1b4e84f4c451 249 {
nherriot 2:bcc9256ecaab 250 DBG("The SMS message indicates I should open the door");
nherriot 7:316c2dac06a5 251
nherriot 7:316c2dac06a5 252 // check the door is not already open if it is do nothing and send a warning back to the sender
nherriot 7:316c2dac06a5 253 // for this door the switch 'true' then its closed - we have to have an active signal to show it's securely closed
nherriot 8:1b4e84f4c451 254
nherriot 15:262da03e3e20 255 if (read_digital() == 0 )
nherriot 7:316c2dac06a5 256 {
nherriot 7:316c2dac06a5 257 DBG("The door is already open - so I'll do nothing");
nherriot 8:1b4e84f4c451 258 connectionManager.sendSM(num, " WARNING - The door is already open sir! ");
nherriot 7:316c2dac06a5 259 }
nherriot 7:316c2dac06a5 260 else
nherriot 7:316c2dac06a5 261 {
nherriot 7:316c2dac06a5 262 doorContactorRelay = 1;
nherriot 8:1b4e84f4c451 263 openTheDoor = true; // set the state vairable to let the door contoller know it needs to open the door
nherriot 22:87d73be30243 264 alarmActive = false; // set the alarm OFF until the door is open
nherriot 22:87d73be30243 265 led4 = 0; // set the alarm light to off
nherriot 22:87d73be30243 266 DBG("The ALARM is now set to %d: ", alarmActive);
nherriot 7:316c2dac06a5 267 led3 = 1;
nherriot 7:316c2dac06a5 268 DBG("The relay has been activated to open the door");
nherriot 8:1b4e84f4c451 269 connectionManager.sendSM(num, " Door open sir... Welcome home! " );
nherriot 8:1b4e84f4c451 270 }
nherriot 8:1b4e84f4c451 271 }
nherriot 8:1b4e84f4c451 272 else
nherriot 8:1b4e84f4c451 273 {
nherriot 2:bcc9256ecaab 274 DBG("The SMS message is not recognized");
nherriot 7:316c2dac06a5 275 connectionManager.sendSM(num, " Wrong password sir... Try 'open' and I'll open! ;-) ");
nherriot 2:bcc9256ecaab 276 }
nherriot 2:bcc9256ecaab 277
nherriot 2:bcc9256ecaab 278
nherriot 2:bcc9256ecaab 279
nherriot 0:5136cdfaebd0 280 }
nherriot 6:5a892c3d738e 281 Thread::wait(500);
nherriot 0:5136cdfaebd0 282 }
nherriot 0:5136cdfaebd0 283 }
nherriot 0:5136cdfaebd0 284
nherriot 0:5136cdfaebd0 285 void keepAlive(void const*) {
nherriot 0:5136cdfaebd0 286 while(1)
nherriot 0:5136cdfaebd0 287 {
nherriot 8:1b4e84f4c451 288 led2=!led2;
nherriot 0:5136cdfaebd0 289 Thread::wait(500);
nherriot 0:5136cdfaebd0 290 }
nherriot 0:5136cdfaebd0 291 }
nherriot 0:5136cdfaebd0 292
nherriot 0:5136cdfaebd0 293 void tick()
nherriot 0:5136cdfaebd0 294 {
nherriot 0:5136cdfaebd0 295 led4=!led4;
nherriot 0:5136cdfaebd0 296 }
nherriot 0:5136cdfaebd0 297
nherriot 0:5136cdfaebd0 298 int main() {
nherriot 16:9245c3a37491 299 //Ticker t;
nherriot 16:9245c3a37491 300 //t.attach(tick,1);
nherriot 0:5136cdfaebd0 301 DBG_INIT();
nherriot 12:e622e146b3cd 302 DBG_SET_SPEED(115200);
nherriot 23:28b693d586ee 303 test(NULL);
nherriot 23:28b693d586ee 304 //Thread testTask(test, NULL, osPriorityNormal, 1024*5);
nherriot 0:5136cdfaebd0 305
donatien 14:9ee94196b75d 306 keepAlive(NULL);
nherriot 0:5136cdfaebd0 307
nherriot 0:5136cdfaebd0 308
nherriot 0:5136cdfaebd0 309 return 0;
nherriot 0:5136cdfaebd0 310 }