Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def Method_and_DocString_output(TI):
- UI = TI.GetPlatformInterface()
- BB = TI.GetBlackboardInterface()
- debug_file = open('log/dir_outputs.txt', 'w')
- dirTI = dir(TI)
- dirUI = dir(UI)
- dirBB = dir(BB)
- FC = UI.GetFireControlInfo()
- dirFC = dir(FC)
- FP = UI.GetFlightPortInfo()
- dirFP = dir(FP)
- SI = UI.GetSubInterface()
- dirSI = dir(SI)
- launcher = UI.GetLauncherInfo(0)
- dir_launcher = dir(launcher)
- mission = UI.GetMissionInfo()
- dir_mission = dir(mission)
- sensor = UI.GetSensorInfo(0)
- dir_sensor = dir(sensor)
- for x in range(0, 1000):
- try:
- UI.GetTrackById(x)
- if track.IsValid():
- break
- except:
- x += 1
- track = UI.GetTrackById(x)
- dir_track = dir(track)
- FP = UI.GetFlightPortInfo()
- status = FP.GetUnitStatus(0)
- dir_status = dir(status)
- debug_file.write('################\n## ##\n## TI ##\n## ##\n################\n')
- for n in range(0,len(dirTI)):
- debug_file.write(' TI.%s\n' % dirTI[n])
- valn = getattr(TI, dirTI[n])
- try:
- istype = type(valn)
- debug_file.write(' type: %s\n' % istype)
- except:
- debug_file.write(' type: unknown\n')
- try:
- iscallable = callable(valn)
- debug_file.write(' callable?: %s\n' % iscallable)
- except:
- debug_file.write(' callable?: definitely NOT!\n')
- try:
- doc = valn.__doc__
- debug_file.write(' doc string: %s\n\n\n\n' % doc)
- except:
- debug_file.write(' doc string: there is no such string here\n\n\n\n')
- debug_file.write('################\n## ##\n## UI ##\n## ##\n################\n')
- for n in range(0,len(dirUI)):
- debug_file.write(' UI.%s\n' % dirUI[n])
- valn = getattr(UI, dirUI[n])
- try:
- istype = type(valn)
- debug_file.write(' type: %s\n' % istype)
- except:
- debug_file.write(' type: unknown\n')
- try:
- iscallable = callable(valn)
- debug_file.write(' callable?: %s\n' % iscallable)
- except:
- debug_file.write(' callable?: definitely NOT!\n')
- try:
- doc = valn.__doc__
- debug_file.write(' doc string: %s\n\n\n\n' % doc)
- except:
- debug_file.write(' doc string: there is no such string here\n\n\n\n')
- debug_file.write('################\n## ##\n## BB ##\n## ##\n################\n')
- for n in range(0,len(dirBB)):
- debug_file.write(' BB.%s\n' % dirBB[n])
- valn = getattr(BB, dirBB[n])
- try:
- istype = type(valn)
- debug_file.write(' type: %s\n' % istype)
- except:
- debug_file.write(' type: unknown\n')
- try:
- iscallable = callable(valn)
- debug_file.write(' callable?: %s\n' % iscallable)
- except:
- debug_file.write(' callable?: definitely NOT!\n')
- try:
- doc = valn.__doc__
- debug_file.write(' doc string: %s\n\n\n\n' % doc)
- except:
- debug_file.write(' doc string: there is no such string here\n\n\n\n')
- debug_file.write('################\n## ##\n## FC ##\n## ##\n################\n')
- for n in range(0,len(dirFC)):
- debug_file.write(' FC.%s\n' % dirFC[n])
- valn = getattr(FC, dirFC[n])
- try:
- istype = type(valn)
- debug_file.write(' type: %s\n' % istype)
- except:
- debug_file.write(' type: unknown\n')
- try:
- iscallable = callable(valn)
- debug_file.write(' callable?: %s\n' % iscallable)
- except:
- debug_file.write(' callable?: definitely NOT!\n')
- try:
- doc = valn.__doc__
- debug_file.write(' doc string: %s\n\n\n\n' % doc)
- except:
- debug_file.write(' doc string: there is no such string here\n\n\n\n')
- debug_file.write('################\n## ##\n## FP ##\n## ##\n################\n')
- for n in range(0,len(dirFP)):
- debug_file.write(' FP.%s\n' % dirFP[n])
- valn = getattr(FP, dirFP[n])
- try:
- istype = type(valn)
- debug_file.write(' type: %s\n' % istype)
- except:
- debug_file.write(' type: unknown\n')
- try:
- iscallable = callable(valn)
- debug_file.write(' callable?: %s\n' % iscallable)
- except:
- debug_file.write(' callable?: definitely NOT!\n')
- try:
- doc = valn.__doc__
- debug_file.write(' doc string: %s\n\n\n\n' % doc)
- except:
- debug_file.write(' doc string: there is no such string here\n\n\n\n')
- debug_file.write('################\n## ##\n## SI ##\n## ##\n################\n')
- for n in range(0,len(dirSI)):
- debug_file.write(' SI.%s\n' % dirSI[n])
- valn = getattr(SI, dirSI[n])
- try:
- istype = type(valn)
- debug_file.write(' type: %s\n' % istype)
- except:
- debug_file.write(' type: unknown\n')
- try:
- iscallable = callable(valn)
- debug_file.write(' callable?: %s\n' % iscallable)
- except:
- debug_file.write(' callable?: definitely NOT!\n')
- try:
- doc = valn.__doc__
- debug_file.write(' doc string: %s\n\n\n\n' % doc)
- except:
- debug_file.write(' doc string: there is no such string here\n\n\n\n')
- debug_file.write('################\n## ##\n## Launcher ##\n## ##\n################\n')
- for n in range(0,len(dir_launcher)):
- debug_file.write(' launcher.%s\n' % dir_launcher[n])
- valn = getattr(launcher, dir_launcher[n])
- try:
- istype = type(valn)
- debug_file.write(' type: %s\n' % istype)
- except:
- debug_file.write(' type: unknown\n')
- try:
- iscallable = callable(valn)
- debug_file.write(' callable?: %s\n' % iscallable)
- except:
- debug_file.write(' callable?: definitely NOT!\n')
- try:
- doc = valn.__doc__
- debug_file.write(' doc string: %s\n\n\n\n' % doc)
- except:
- debug_file.write(' doc string: there is no such string here\n\n\n\n')
- debug_file.write('################\n## ##\n## Mission ##\n## ##\n################\n')
- for n in range(0,len(dir_mission)):
- debug_file.write(' mission.%s\n' % dir_mission[n])
- valn = getattr(mission, dir_mission[n])
- try:
- istype = type(valn)
- debug_file.write(' type: %s\n' % istype)
- except:
- debug_file.write(' type: unknown\n')
- try:
- iscallable = callable(valn)
- debug_file.write(' callable?: %s\n' % iscallable)
- except:
- debug_file.write(' callable?: definitely NOT!\n')
- try:
- doc = valn.__doc__
- debug_file.write(' doc string: %s\n\n\n\n' % doc)
- except:
- debug_file.write(' doc string: there is no such string here\n\n\n\n')
- debug_file.write('################\n## ##\n## Sensor ##\n## ##\n################\n')
- for n in range(0,len(dir_sensor)):
- debug_file.write(' sensor.%s\n' % dir_sensor[n])
- valn = getattr(mission, dir_mission[n])
- try:
- istype = type(valn)
- debug_file.write(' type: %s\n' % istype)
- except:
- debug_file.write(' type: unknown\n')
- try:
- iscallable = callable(valn)
- debug_file.write(' callable?: %s\n' % iscallable)
- except:
- debug_file.write(' callable?: definitely NOT!\n')
- try:
- doc = valn.__doc__
- debug_file.write(' doc string: %s\n\n\n\n' % doc)
- except:
- debug_file.write(' doc string: there is no such string here\n\n\n\n')
- debug_file.write('################\n## ##\n## Track ##\n## ##\n################\n\n\n')
- for n in range(0,len(dir_track)):
- debug_file.write(' track.%s\n' % dir_track[n])
- valn = getattr(track, dir_track[n])
- try:
- istype = type(valn)
- debug_file.write(' type: %s\n' % istype)
- except:
- debug_file.write(' type: unknown\n')
- try:
- iscallable = callable(valn)
- debug_file.write(' callable?: %s\n' % iscallable)
- except:
- debug_file.write(' callable?: definitely NOT!\n')
- try:
- doc = valn.__doc__
- debug_file.write(' doc string: %s\n\n\n\n' % doc)
- except:
- debug_file.write(' doc string: there is no such string here\n\n\n\n')
- debug_file.write('################\n## ##\n## Status ##\n## ##\n################\n')
- for n in range(0,len(dir_status)):
- debug_file.write(' status.%s\n' % dir_status[n])
- valn = getattr(status, dir_status[n])
- try:
- istype = type(valn)
- debug_file.write(' type: %s\n' % istype)
- except:
- debug_file.write(' type: unknown\n')
- try:
- iscallable = callable(valn)
- debug_file.write(' callable?: %s\n' % iscallable)
- except:
- debug_file.write(' callable?: definitely NOT!\n')
- try:
- doc = valn.__doc__
- debug_file.write(' doc string: %s\n\n\n\n' % doc)
- except:
- debug_file.write(' doc string: there is no such string here\n\n\n\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement