#@fileName #@brief - # #Revision Log: # v1.0.2 : Aug 4, 2016 INITIAL OF PROGRAMMER - REVISION DETAIL_1 <- THIS IS THE LATEST REVISION #Description: #YalgaarInitModule contents methods and variables and enum.. # #@bug Known Issues: # 1. ISSUE NAME - NONE # WORKAROUND - NONE #@details Notes: NONE #SLS MAKES NO REPRESENTATION, WARRANTY, OR CONDITION OF #ANY KIND, EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE OR IN #ANY COMMUNICATION WITH YOU, INCLUDING, BUT NOT LIMITED TO, #ANY IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY #QUALITY, FITNESS FOR ANY PARTICULAR PURPOSE, #NONINFRINGEMENT, AND THEIR EQUIVALENTS. #SLS Propritery and Confidential #@copyright (C) 2016 SLS Corporation, All Rights Reserved. #!/usr/bin/env ruby require 'rubygems' require 'openssl' require 'base64' require 'json' require_relative 'mqtt' # Namespace module for YalgaarInit default variables... module YalgaarInit include MQTT #YalgaarConnectionENUM for connection methods YALGAARAESTYPEENUM= [ YALGAR_AES_128=128, YALGAR_AES_192=192, YALGAR_AES_256=256 ] YalgaarConnectionENUM= [ NoARGV=0x00, ONEARGV=0x01, TWOARGV=0x02, THREEARGV=0x03, FOURARGV=0x04, FIVEARGV=0x05, MAXARGV=0xFF ] YalgaarErrorCodeENUM= [ YALGAAR_CONNECT_SUCCESS=0, YALGAAR_DISCONNECT_SUCCESS=1, YALGAAR_101=101, YALGAAR_102=102, YALGAAR_103=103, YALGAAR_104=104, YALGAAR_105=105, YALGAAR_106=106, YALGAAR_107=107, YALGAAR_108=108, YALGAAR_109=109, YALGAAR_110=110, YALGAAR_111=111, YALGAAR_112=112, YALGAAR_113=113, YALGAAR_114=114, YALGAAR_115=115, YALGAAR_116=116, YALGAAR_117=117, YALGAAR_118=118, YALGAAR_119=119, YALGAAR_120=120, YALGAAR_121=121, YALGAAR_122=122, YALGAAR_123=123, YALGAAR_150=150, YALGAAR_NO_SERVER_CONNECTION=151, YALGAAR_INVALID_AES_TYPE=152, YALGAAR_INVALID_AES_KEY_LENGTH=153, YALGAAR_MAX=200 ] #init(message); #@brief - #@param : #DESCRIPTION: def init #~ puts "In init" @@isConnected=false @@clientKey=nil @@isSecure=nil @@uuid=nil @@aesSecretKey=nil @@aesType=nil @@keepalive=30 @@connectTimeout=60 @@alive_time=200 @@client=nil @@lErrorConnectionCallback=nil @@lEroorCallback=nil @@lSubCallback=nil @@lPresenceCallback=nil @@lHistoryCallback=nil @@lChannelList=nil @@lUserList=nil @@host='api.yalgaar.io' @@isEncrpt=nil end end module YalgaarApis include MQTT include YalgaarInit #pubACK(channel); #@brief - #@param : #DESCRIPTION: #@param : #DESCRIPTION: #@param : #DESCRIPTION: #@bug Known Issues: #1.50 len=10 end character_set = ["A".."Z", "a".."z", "0".."9",'_','-','@'] chars = character_set.map{|x| x.is_a?(Range) ? x.to_a : x }.flatten Array.new(len){ chars.sample }.join end #messageParsing(length); #@brief - #@param : #DESCRIPTION: #@param : #DESCRIPTION: #@param : #DESCRIPTION: #@param : #DESCRIPTION: exc puts "Message for the encryption log file for message #{msg} = #{exc.message}" end end #decryption(channel); #@brief - #@param : #DESCRIPTION: exc puts "Message for the decryption log file for message #{msg} = #{exc.message}" end end #showErrCode(code); #@brief - #@param : #DESCRIPTION: