Browse Source

UpdateCamRange for SQLite

AGP
Evgeny Gagua 3 years ago
parent
commit
312f124342
  1. 7
      Projects/la_mojo/build
  2. 16
      lib/App/common/SQLite_dataBinder.cpp
  3. 1
      lib/App/common/SQLite_dataBinder.h

7
Projects/la_mojo/build

@ -1,8 +1,11 @@
#! /bin/sh
#make clean -e "CFG=Debug"
make -e "CFG=Debug" -j6
make clean -e "CFG=Debug"
#make -e "CFG=Debug" -j6
make clean -e "CFG=Debug86"
make -e "CFG=Debug86" -j4
#make clean -e "CFG=Release86"
#make -e "CFG=Release86" -j4

16
lib/App/common/SQLite_dataBinder.cpp

@ -3514,6 +3514,22 @@ bool sqliteDBC::updateIPCam( uint32_t CamID, CSTR Addr ){
return false;
};
bool sqliteDBC::updateCamRange( uint32_t camID, float range ){
if( m_bStoIsConnected ) {
char tQBuf[MAX_PATH_LEN];
sprintf(tQBuf,"UPDATE `cameras` SET `max_range`=%.3f WHERE `id`=%d",
range,
camID
);
#ifdef DEBUG_EXTRA
LOG(tQBuf);
#endif
m_pDataStorage->SilentQuery( tQBuf );
return true;
};
return false;
};
bool sqliteDBC::updateCamOnlineStatus( uint32_t camID, bool online ){
if( m_bStoIsConnected ) {
char tQBuf[MAX_PATH_LEN];

1
lib/App/common/SQLite_dataBinder.h

@ -167,6 +167,7 @@ class sqliteDBC: public dataBinder {
virtual bool setRessourceActive( uint32_t RessourceID, bool Status = true );
virtual bool setStreamValid( uint32_t streamID, bool status = true );
virtual void unregisterServer( void );
virtual bool updateCamRange( uint32_t camID, float range );
virtual bool updateCamOnlineStatus( uint32_t camID, bool online );
virtual bool updateIPCam( uint32_t CamID, CSTR Addr );
virtual bool updateIPCam( CSTR uuid, CSTR Addr );

Loading…
Cancel
Save