示例#1
0
文件: FLAP.php 项目: carriercomm/jbs
function FLAP_Explode($String)
{
    /****************************************************************************/
    $__args_types = array('string');
    #-----------------------------------------------------------------------------
    $__args__ = Func_Get_Args();
    eval(FUNCTION_INIT);
    /****************************************************************************/
    if (StrLen($String) < 6) {
        return FALSE;
    }
    #-----------------------------------------------------------------------------
    return array('Chanel' => Bytes_Get($String, 01), 'Number' => Bytes_Get($String, 02, 02), 'Data' => SubStr($String, 06));
}
示例#2
0
文件: SNAC.php 项目: carriercomm/jbs
function SNAC_Explode($String)
{
    /****************************************************************************/
    $__args_types = array('string');
    #-----------------------------------------------------------------------------
    $__args__ = Func_Get_Args();
    eval(FUNCTION_INIT);
    /****************************************************************************/
    $Result = array('FamilyID' => Bytes_Get($String, 00, WORD), 'SubTypeID' => Bytes_Get($String, 02, WORD), 'Flag0' => Bytes_Get($String, 05, BUTE), 'Flag1' => Bytes_Get($String, 06, BUTE), 'RequestID' => Bytes_Get($String, 04, BUTE));
    #-----------------------------------------------------------------------------
    $Result['Data'] = SubStr($String, 11);
    # Сам пакет
    #-----------------------------------------------------------------------------
    return $Result;
}
示例#3
0
文件: TVL.php 项目: carriercomm/jbs
function TVL_Explode($String, &$Array = array())
{
    /****************************************************************************/
    $__args_types = array('string', 'array');
    #-----------------------------------------------------------------------------
    $__args__ = Func_Get_Args();
    eval(FUNCTION_INIT);
    /****************************************************************************/
    $Length = HexDec(Bytes_Get($String, 02, WORD));
    #-----------------------------------------------------------------------------
    $Array[Bytes_Get($String, 00, WORD)] = SubStr($String, 04, $Length);
    #-----------------------------------------------------------------------------
    if (StrLen($String = SubStr($String, 04 + $Length)) > 0) {
        TVL_Explode($String, $Array);
    }
    #-----------------------------------------------------------------------------
    return $Array;
}