def attachAccept(PTmsiSignature_presence=0, GprsTimer_presence=0,
                 MobileId_presence=0, MobileId_presence1=0,
                 GmmCause_presence=0):
    """ATTACH ACCEPT Section 9.4.2"""
    a = TpPd(pd=0x3)
    b = MessageType(mesType=0x2)  # 00000010
    c = AttachResult()
    d = ForceToStandby()
    e = GprsTimer()
    f = RadioPriorityAndSpareHalfOctets()
    h = RoutingAreaIdentification()
    packet = a / b / c / d / e / f / h
    if PTmsiSignature_presence is 1:
        i = PTmsiSignature(ieiPTS=0x19)
        packet = packet / i
    if GprsTimer_presence is 1:
        j = GprsTimer(ieiGT=0x17)
        packet = packet / j
    if MobileId_presence is 1:
        k = MobileIdHdr(ieiMI=0x18, eightBitMI=0x0)
        packet = packet / k
    if MobileId_presence1 is 1:
        l = MobileIdHdr(ieiMI=0x23, eightBitMI=0x0)
        packet = packet / l
    if GmmCause_presence is 1:
        m = GmmCause(ieiGC=0x25)
        packet = packet / m
    return packet
def attachAccept ( PTmsiSignature_presence = 0 , GprsTimer_presence = 0 , MobileId_presence = 0 , MobileId_presence1 = 0 , GmmCause_presence = 0 ) : a = TpPd ( pd = 0x3 ) b = MessageType ( mesType = 0x2 ) c = AttachResult ( ) d = ForceToStandby ( ) e = GprsTimer ( ) f = RadioPriorityAndSpareHalfOctets ( ) h = RoutingAreaIdentification ( ) packet = a / b / c / d / e / f / h if PTmsiSignature_presence is 1 : i = PTmsiSignature ( ieiPTS = 0x19 ) packet = packet / i if GprsTimer_presence is 1 : j = GprsTimer ( ieiGT = 0x17 ) packet = packet / j if MobileId_presence is 1 : k = MobileIdHdr ( ieiMI = 0x18 , eightBitMI = 0x0 ) packet = packet / k if MobileId_presence1 is 1 : l = MobileIdHdr ( ieiMI = 0x23 , eightBitMI = 0x0 ) packet = packet / l if GmmCause_presence is 1 : m = GmmCause ( ieiGC = 0x25 ) packet = packet / m return packet
ATTACH ACCEPT Section 9.4.2