1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Mead
- * Date: 2019/9/3
- * Time: 8:05 PM
- */
- namespace App\Servers\Weikemu\Transforms;
- use App\Models\BoxSettingTraitModel;
- use App\Models\WarningLogTraitModel;
- use App\Servers\BaseServer;
- /**
- * 状态报文
- * Class LoginServer
- * @package App\Servers
- */
- class StatusTransform extends BaseServer
- {
- use BoxSettingTraitModel, WarningLogTraitModel;
- public function main($body)
- {
- $data = $this->decode($body);
- return $this->response();
- }
- /**
- * 状态响应
- * @param $login_type
- * @return array
- * User: Mead
- */
- public function response($login_type = '00')
- {
- $body = [
- '5b',
- '0000'
- ];
- return $body;
- }
- /**
- * 解析装载的状态消息
- * @param $body
- * @return array
- * User: Mead
- */
- private function decode($body)
- {
- $top34Data = $this->decodeWeiKeMuTop34($body);
- // $i = 34;
- return $top34Data;
- }
- /**
- * 处理设备序列号
- * @param $no
- * @return bool|string
- * User: Mead
- */
- private
- static function box_no($no)
- {
- return substr($no, 0, 9);
- }
- }
|