int TAPCOM_GetReturnValue (TAPCOM_Channel Channel)
{
  TAPCOM_InternalMesBuf *buf = (TAPCOM_InternalMesBuf *) Channel;

  if (!isValidChannel(Channel) || (buf->Status != TAPCOM_Status_FINISHED)) return TAPCOM_NO_RETURN_VALUE;
  else return buf->ReturnVal;
}
TAPCOM_Channel TAPCOM_GetChannel (dword param1, dword *CallerID, dword *ServiceID, dword *ParamBlockVersion, void **ParamBlock)
{
  TAPCOM_InternalMesBuf *mesBuf = (TAPCOM_InternalMesBuf *) param1;

  if (!isValidChannel (mesBuf)) return NULL;

  if (mesBuf->tapcomVersion >= TAPCOM_REQVERSION)
  {
    if ((mesBuf->ToID == __tap_ud__) || (mesBuf->ToID == TAPCOM_App_BROADCAST))
    {
      // die Nachricht ist für mich oder Broadcast
      if (CallerID          != NULL) *CallerID           = mesBuf->FromID;
      if (ServiceID         != NULL) *ServiceID          = mesBuf->ServiceID;
      if (ParamBlockVersion != NULL) *ParamBlockVersion  = mesBuf->ParamBlockVersion;
      if (ParamBlock        != NULL) *ParamBlock         = mesBuf->ParamBlock;
      // Infos aus Message-Buffer holen

      //Falls es sich um keinen Broadcast handelt, den Block auf bestätigt setzen
      if (mesBuf->ToID != TAPCOM_App_BROADCAST) mesBuf->Status = TAPCOM_Status_ACKNOWLEDGED;
    }
    else return NULL;
  }
  else
  {
    mesBuf->Status = TAPCOM_Status_VERSIONMISMATCH;
    mesBuf->ReturnVal = TAPCOM_REQVERSION;
  }

  //Server-Timeout zurücksetzen
  mesBuf->ServerAlive = TAP_GetTick();

  return (TAPCOM_Channel) mesBuf;
}
示例#3
0
void MTBASerial::send(byte data, word channel)
{
  if (!isValidChannel(channel))
    return;
  
  byte sendBuffer[4] = { 255, channel, 1, data };
  Serial.write(sendBuffer, sizeof(sendBuffer));
}
示例#4
0
double IdacDriver2Es::IdacGetChannelBaseRate(int iChan) const {
	CHECK_PARAM_RETVAL(isValidChannel(iChan), 0);

	const IdacChannelSettings* chan = channelSettings(iChan);
	if (chan->mEnabled == 0)
		return 0;
	// Digital (chan 0) is fixed
	else if (iChan == 0)
		return IDAC_DIG_SAMPLEBASE;
	else
		return IDAC_AN_SAMPLEBASE;
}
bool AnimationCleanerVisitor::isValidAnimation(const osgAnimation::Animation& animation) const {
    // a valid animation has at least one channel and all channels must be valid
    const osgAnimation::ChannelList& channels = animation.getChannels();

    for(osgAnimation::ChannelList::const_iterator channel = channels.begin() ; channel != channels.end() ; ++ channel) {
        if(!channel->valid() || !isValidChannel(*channel->get())) {
            return false;
        }
    }

    return channels.size() > 0;
}
示例#6
0
void MTBASerial::send(long data, word channel)
{
  if (!isValidChannel(channel))
    return;

  byte dataB24 = data >> 24;
  byte dataB16 = data >> 16;
  byte dataB8 = data >> 8;
  byte dataB0 = data & 255;

  byte sendBuffer[7] = { 255, channel, 4, dataB24, dataB16, dataB8, dataB0 };
  Serial.write(sendBuffer, sizeof(sendBuffer));
}
示例#7
0
dword TAPCOM_LastAlive(TAPCOM_Channel Channel)
{
  TRACEENTER();

  dword ret;

  if(isValidChannel(Channel))
    ret = ((TAPCOM_InternalMesBuf *) Channel)->ServerAlive;
  else
    ret = 0;

  TRACEEXIT();
  return ret;
}
示例#8
0
文件: lsi6_main.c 项目: basilevs/lsi6
static void lsi6_handleChannelInterrupt(lsi6_channel * channel) {
    lsi6_dev_t * lsi = channel->lsi;
    lsi6_regs_t *lsi6_regs = (lsi6_regs_t *)lsi->base;
    int k, chnum = channel - lsi->channels;
    unsigned long interflags;
#ifdef DEBUG
    static int fail = 0;
    if (fail) return;
    if (!isValidChannel(channel)) {
        fail=1;
        return;
    }
#endif
    if (!channel) {
        printk(DRV_NAME ": null channel reference in lsi6_handleChannelInterrupt\n");
        return;
    }
    if (chnum<0 || chnum >= LSI6_NUMCHANNELS) {
        printk(DRV_NAME ": bad channel number %d is calculated in lsi6_handleChannelInterrupt\n", chnum);
        return;
    }
    if (!lsi) {
        printk(DRV_NAME ": null device reference in lsi6_handleChannelInterrupt\n");
        return;
    }

    CHAN_LOCK_OR(return);
    if (0) {
        printk(DRV_NAME ": timeout while locking channel in bottom half IRQ handler. The interrupt was lost.\n");
        //TODO: consider implementing a real timeout here
    } else {
        // Read and reset lam register.
        int lmr = 0;
        if (k0607_read_lmr(lsi, chnum, &lmr) != -1) {
            int mask = lmr & 0xff; //First byte of mask/requests contains enabled groups
            int reqs = (lmr >> 8) & 0xff; //Second byte of mask/requests contains group requests
            DP(printk(DRV_NAME ": mask/requests register in channel %d: %x\n", chnum, lmr));
            reqs &= mask;
            for (k = 0; k < K0607_LGROUPS; k++) {
                if (reqs & (1 << k)) {
                    DP(printk(DRV_NAME ": lam in channel %d, group %d\n", chnum, k));
                    lsi->LWQ_flags[chnum][k] = 1;
                    wake_up_interruptible(&lsi->LWQ[chnum][k]);
                }
            }
            // Disabling corresponding LAM groups (the first byte of the same register)
            // A process interested in LAM group should reenable it before waiting on wait queue.
            k0607_write_lmr(lsi, chnum, mask & (~reqs));
        }
    }
示例#9
0
int
set40M_Channel_5G(char *channel)
{
        if( channel==NULL || !isValidChannel(0, channel) )
                return 0;

        nvram_set( "wl1_channel", channel);
        nvram_set( "wl1_nbw_cap", "1");
        nvram_set( "wl1_nctrlsb", "lower");
        nvram_set( "wl1_obss_coex", "0");
        eval( "wlconf", "eth2", "down" );
        eval( "wlconf", "eth2", "up" );
        eval( "wlconf", "eth2", "start" );
	puts("1");
        return 1;
}
示例#10
0
void MTBASerial::send(int data, word channel)
{
  if (!isValidChannel(channel))
    return;

  if (_isInt32b)
  {
    send(static_cast<long>(data), channel);
    return;
  }

  byte dataMSB = data >> 8;
  byte dataLSB = data & 255;

  byte sendBuffer[5] = { 255, channel, 2, dataMSB, dataLSB };
  Serial.write(sendBuffer, sizeof(sendBuffer));
}
示例#11
0
void TAPCOM_Finish(TAPCOM_Channel Channel, int val)
{
  TRACEENTER();

  TAPCOM_InternalMesBuf *buf = (TAPCOM_InternalMesBuf *) Channel;

  if(isValidChannel(Channel))
  {
    buf->Status    = TAPCOM_Status_FINISHED;
    buf->ReturnVal = val;

    //Server-Timeout zurücksetzen
    buf->ServerAlive = TAP_GetTick();
  }

  TRACEEXIT();
}
void AnimationCleanerVisitor::cleanAnimation(osgAnimation::Animation& animation) {
    // remove animation's invalid channels
    osgAnimation::ChannelList& channels = animation.getChannels();
    osgAnimation::ChannelList invalids;

    for(osgAnimation::ChannelList::iterator channel = channels.begin() ; channel != channels.end() ; ++ channel) {
        if(channel->valid()) {
            cleanChannel(*channel->get());
        }

        if(!channel->valid() || !isValidChannel(*channel->get())) {
            invalids.push_back(channel->get());
        }
    }

    for(osgAnimation::ChannelList::iterator invalid = invalids.begin() ; invalid != invalids.end() ; ++ invalid) {
        animation.removeChannel(invalid->get());
    }
}
示例#13
0
TAPCOM_Status TAPCOM_GetStatus(TAPCOM_Channel Channel)
{
  TRACEENTER();

  TAPCOM_InternalMesBuf *buf = (TAPCOM_InternalMesBuf *) Channel;

  if(!isValidChannel(Channel))
  {
    TRACEEXIT();
    return TAPCOM_Status_NO_CHANNEL;
  }

  //Prüfe, ob der Server überhaupt noch aktiv ist.
  if(((buf->Status == TAPCOM_Status_OPEN) || (buf->Status == TAPCOM_Status_ACKNOWLEDGED)) && (!HDD_TAP_isRunning(buf->ToID)))
    buf->Status = TAPCOM_Status_SERVER_NOT_AVAILABLE;

  TRACEEXIT();
  return buf->Status;
}
float MotionGraphController::getValue(CHANNEL_ID _channel, float _time)
{
	// update internal state (if time has passed since last external access)
	update(_time);

	MotionSequence *motion_sequence = lookupMotionSequenceByID(status.active_seqID);
	if (motion_sequence == NULL)
	{
		stringstream ss;
		ss << "MotionGraphController::getValue: MotionGraphController has no attached MotionSequence for " << status.active_seqID;
		logout << ss.str() << endl;
		throw AppException(ss.str().c_str());
	}
	if (!isValidChannel(_channel, _time))
	{
		stringstream ss;
		ss << "MotionSequenceController received request for invalid channel bone: "
			<< _channel.bone_id << " dof: " << _channel.channel_type;
		throw AppException(ss.str().c_str());
	}
	return motion_sequence->getValue(_channel, status.active_frame);
}
示例#15
0
float MotionSequenceController::getValue(CHANNEL_ID _channel, float _time)
{
	if (motion_sequence == NULL) 
		throw AnimationException("MotionSequenceController has no attached MotionSequence");

	if (!isValidChannel(_channel, _time)) 
	{
		string s = string("MotionSequenceController received request for invalid channel ") 
			+ " bone: " + toString(_channel.bone_id) + " dof: " + toString(_channel.channel_type);
		throw AnimationException(s.c_str());
	}

	float duration = motion_sequence->getDuration();
	long cycles = long(_time / duration);
	
	sequence_time = _time - duration*cycles;
	if (sequence_time > duration) sequence_time = 0.0f;

	int frame = int(motion_sequence->numFrames()*sequence_time/duration);

	float value = motion_sequence->getValue(_channel, frame);

	if (apply_start_offset)
	{
		// modify root based on offsets.
		if (_channel.bone_id == 0)
		{
			if (!frame_is_cached[frame])
			{
				Vector3D frame_position(
					motion_sequence->getValue(CHANNEL_ID(0,CT_TX), frame),
					motion_sequence->getValue(CHANNEL_ID(0,CT_TY), frame),
					motion_sequence->getValue(CHANNEL_ID(0,CT_TZ), frame));
				Vector3D frame_orientation(
					motion_sequence->getValue(CHANNEL_ID(0,CT_RX), frame),
					motion_sequence->getValue(CHANNEL_ID(0,CT_RY), frame),
					motion_sequence->getValue(CHANNEL_ID(0,CT_RZ), frame));

				frame_position = start_offset_combined_transform * frame_position;

				Matrix4x4 orig_orientation_transform = 
					Matrix4x4::rotationRPY(frame_orientation.roll, frame_orientation.pitch, frame_orientation.yaw);
				Matrix4x4 new_orientation_transform = start_offset_rotation_transform*orig_orientation_transform;
				
				float p, y, r;
				// invalid rotation concatenation, Euler angles don't add properly
				p = frame_orientation.pitch + start_offset_rotation.pitch;
				y = frame_orientation.yaw + start_offset_rotation.yaw;
				r = frame_orientation.roll + start_offset_rotation.roll;
				//logout << "Frame " << frame << endl;
				//logout << "\tframe orientation: " << frame_orientation << endl;
				//logout << "\toffset rotation: " << start_offset_rotation << endl;
				frame_orientation = Vector3D(p,y,r);
				//logout << "\tnew orientation: " << frame_orientation << endl;
				
				root_cache.set(frame,0,frame_position.x);
				root_cache.set(frame,1,frame_position.y);
				root_cache.set(frame,2,frame_position.z);
				root_cache.set(frame,3,frame_orientation.pitch);
				root_cache.set(frame,4,frame_orientation.yaw);
				root_cache.set(frame,5,frame_orientation.roll);
				frame_is_cached[frame] = true;
			}
			switch(_channel.channel_type)
			{
			case CT_TX:
				value = root_cache.get(frame,0); break;
			case CT_TY:
				value = root_cache.get(frame,1); break;
			case CT_TZ:
				value = root_cache.get(frame,2); break;
			case CT_RX:
				value = root_cache.get(frame,3); break;
			case CT_RY:
				value = root_cache.get(frame,4); break;
			case CT_RZ:
				value = root_cache.get(frame,5); break;
			default:
				value = 0.0f; break;
			}
		}
	}

	return value;
}
示例#16
0
int TAP_Main (void)
{
  AddTime(0, 0);
  BMP_WriteHeader(NULL, 0, 0);
  BootReason();
  BuildWindowBorder();
  BuildWindowInfo();
  BuildWindowLine();
  BuildWindowLineSelected();
  BuildWindowScrollBar();
  BuildWindowTitle();
  busyWait();
  CalcAbsSectorFromFAT(NULL, 0);
  CalcPrepare();
  CalcTopIndex(0, 0);
  Callback(0, NULL, 0, 0, 0, 0);
  CallbackHelper(NULL, NULL, 0, 0, 0, 0);
  CallBIOS(0, 0, 0, 0, 0);
  CallFirmware(0, 0, 0, 0, 0);
  CallTraceEnable(FALSE);
  CallTraceEnter(NULL);
  CallTraceExit(NULL);
  CallTraceInit();
  CaptureScreen(0, 0, 0, NULL, 0, 0);
  ChangeDirRoot();
  CheckSelectable(0, 0);
  combineVfdData(NULL, NULL);
  compact(NULL, 0);
  CompressBlock(NULL, 0, NULL);
  CompressedTFDSize(NULL, 0, NULL);
  CompressTFD(NULL, 0, NULL, 0, 0, NULL);
  CRC16(0, NULL, 0);
  CRC32 (0, NULL, 0);
  Delay(0);
  DialogEvent(NULL, NULL, NULL);
  DialogMsgBoxButtonAdd(NULL, FALSE);
  DialogMsgBoxExit();
  DialogMsgBoxInit(NULL, NULL, NULL, NULL);
  DialogMsgBoxShow();
  DialogMsgBoxShowInfo(0);
  DialogMsgBoxShowOK();
  DialogMsgBoxShowOKCancel(0);
  DialogMsgBoxShowYesNo(0);
  DialogMsgBoxShowYesNoCancel(0);
  DialogMsgBoxTitleSet(NULL, NULL);
  DialogProfileChange(NULL);
  DialogProfileCheck(NULL, NULL, FALSE);
  DialogProfileLoad(NULL);
  DialogProfileLoadDefault();
  DialogProfileLoadMy(NULL, FALSE);
  DialogProfileSave(NULL);
  DialogProfileSaveDefault();
  DialogProfileScrollBehaviourChange(FALSE, FALSE);
  DialogProgressBarExit();
  DialogProgressBarInit(NULL, NULL, 0, 0, NULL, 0, 0);
  DialogProgressBarSet(0, 0);
  DialogProgressBarShow();
  DialogProgressBarTitleSet(NULL);
  DialogWindowChange(NULL, FALSE);
  DialogWindowCursorChange(FALSE);
  DialogWindowCursorSet(0);
  DialogWindowExit();
  DialogWindowHide();
  DialogWindowInfoAddIcon(0, 0, NULL);
  DialogWindowInfoAddS(0, 0, 0, NULL, 0, 0, 0, 0, 0);
  DialogWindowInfoDeleteAll();
  DialogWindowInit(NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, 0, 0, 0);
  DialogWindowItemAdd(NULL, 0, NULL, 0, FALSE, FALSE, 0, NULL);
  DialogWindowItemAddSeparator();
  DialogWindowItemChangeFlags(0, FALSE, FALSE);
  DialogWindowItemChangeIcon(0, 0, NULL);
  DialogWindowItemChangeParameter(0, NULL, 0);
  DialogWindowItemChangeValue(0, NULL, 0);
  DialogWindowItemDelete(0);
  DialogWindowItemDeleteAll();
  DialogWindowRefresh();
  DialogWindowReInit(0, 0, 0, 0, 0, 0);
  DialogWindowScrollDown();
  DialogWindowScrollDownPage();
  DialogWindowScrollUp();
  DialogWindowScrollUpPage();
  DialogWindowShow();
  DialogWindowTabulatorSet(0, 0);
  DialogWindowTitleChange(NULL, NULL, NULL);
  DialogWindowTypeChange(0);
  DrawMsgBoxButtons();
  DrawMsgBoxTitle();
  DrawOSDLine(0, 0, 0, 0, 0, 0);
  DrawProgressBarBar(0, 0);
  DrawProgressBarTitle();
  DrawWindowBorder();
  DrawWindowInfo();
  DrawWindowLine(0);
  DrawWindowLines();
  DrawWindowScrollBar();
  DrawWindowTitle();
  EndMessageWin();
  exitHook();
  ExtractLine(NULL, NULL);
  FileSelector(NULL, NULL, NULL, 0);
  FileSelectorKey(0, 0);
  FindDBTrack();
  FindInstructionSequence(NULL, NULL, 0, 0, 0, 0);
  findSendToVfdDisplay(0, 0);
  FlashAddFavourite(NULL, 0, FALSE);
  FlashDeleteFavourites();
  FlashFindEndOfServiceNameTableAddress();
  FlashFindEndOfServiceTableAddress(0);
  FlashFindServiceAddress(0, 0, 0, 0);
  FlashFindTransponderIndex(0, 0, 0);
  FlashGetBlockStartAddress(0);
  FlashGetChannelNumber(0, 0, 0, 0);
  FlashGetSatelliteByIndex(0);
  FlashGetServiceByIndex(0, FALSE);
  FlashGetServiceByName (NULL, FALSE);
  FlashGetTransponderCByIndex(0);
  FlashGetTransponderSByIndex(0, 0);
  FlashGetTransponderTByIndex(0);
  FlashGetTrueLocalTime(0, 0);
  FlashGetType();
  FlashInitialize(0);
  FlashProgram();
  FlashReindexFavourites(0, 0, 0);
  FlashReindexTimers(0, 0, 0);
  FlashRemoveCASServices(FALSE);
  FlashRemoveServiceByIndex(0, FALSE);
  FlashRemoveServiceByIndexString(NULL, FALSE);
  FlashRemoveServiceByLCN(NULL, FALSE);
  FlashRemoveServiceByName(NULL, FALSE);
  FlashRemoveServiceByPartOfName(NULL, FALSE);
  FlashRemoveServiceByUHF(NULL, FALSE, FALSE);
  FlashServiceAddressToServiceIndex(NULL);
  FlashWrite(NULL, NULL, 0, NULL);
  FlushCache(NULL, 0);
  FreeOSDRegion(0);
  fwHook(0);
  GetAudioTrackPID(0, NULL);
  GetClusterPointer(0);
  GetCurrentEvent(NULL);
  GetEEPROMAddress();
  GetEEPROMPin();
  GetFrameBufferPixel(0, 0);
  GetFrameSize(0, 0);
  GetFWInfo(0, 0, 0, 0, 0, 0, 0, 0);
  GetHeapParameter(NULL, 0);
  GetLine(NULL, 0);
  GetOSDMapAddress();
  GetOSDRegionHeight(0);
  GetOSDRegionWidth(0);
  GetPinStatus();
  GetPIPPosition(NULL, NULL, NULL, NULL);
  getRECSlotAddress();
  GetSysOsdControl(0);
  GetToppyString(0);
  HasEnoughItemMemory();
  HDD_AAM_Disable();
  HDD_AAM_Enable(0);
  HDD_APM_Disable();
  HDD_APM_Enable(0);
  HDD_BigFile_Read(NULL, 0, 0, NULL);
  HDD_BigFile_Size(NULL);
  HDD_BigFile_Write(NULL, 0, 0, NULL);
  HDD_ChangeDir(NULL);
  HDD_DecodeRECHeader(NULL, NULL);
  HDD_EncodeRECHeader(NULL, NULL, 0);
  HDD_FappendOpen(NULL);
  HDD_FappendWrite(NULL, NULL);
  HDD_FindPCR(NULL, 0);
  HDD_FindPMT(NULL, 0, NULL);
  HDD_FreeSize();
  HDD_GetClusterSize();
  HDD_GetFileDir(NULL, 0, NULL);
  HDD_GetFirmwareDirCluster();
  HDD_GetHddID(NULL, NULL, NULL);
  HDD_IdentifyDevice(NULL);
  HDD_isAnyRecording();
  HDD_isCryptedStream(NULL, 0);
  HDD_isRecording(0);
  HDD_LiveFS_GetChainLength(0);
  HDD_LiveFS_GetFAT1Address();
  HDD_LiveFS_GetFAT2Address();
  HDD_LiveFS_GetFirstCluster(0);
  HDD_LiveFS_GetLastCluster(0);
  HDD_LiveFS_GetNextCluster(0);
  HDD_LiveFS_GetPreviousCluster(0);
  HDD_LiveFS_GetRootDirAddress();
  HDD_LiveFS_GetSuperBlockAddress();
  HDD_MakeNewRecName(NULL, 0);
  HDD_Move(NULL, NULL, NULL);
  HDD_ReadClusterDMA(0, NULL);
  HDD_ReadSector(0, 0);
  HDD_ReadSectorDMA(0, 0, NULL);
  HDD_RECSlotGetAddress(0);
  HDD_RECSlotIsPaused(0);
  HDD_RECSlotPause(0, FALSE);
  HDD_RECSlotSetDuration(0, 0);
  HDD_SetCryptFlag(NULL, 0);
  HDD_SetFileDateTime(NULL, 0, 0, 0);
  HDD_SetSkipFlag (NULL, FALSE);
  HDD_SetStandbyTimer(0);
  HDD_Smart_DisableAttributeAutoSave();
  HDD_Smart_DisableOperations();
  HDD_Smart_EnableAttributeAutoSave();
  HDD_Smart_EnableOperations();
  HDD_Smart_ExecuteOfflineImmediate(0);
  HDD_Smart_ReadData(0);
  HDD_Smart_ReadThresholdData(0);
  HDD_Smart_ReturnStatus();
  HDD_Stop();
  HDD_TAP_Callback(0, NULL, 0, 0, 0, 0);
  HDD_TAP_Disable(0, 0);
  HDD_TAP_DisableAll(0);
  HDD_TAP_DisabledEventHandler(0, 0, 0);
  HDD_TAP_GetCurrentDir(NULL);
  HDD_TAP_GetCurrentDirCluster();
  HDD_TAP_GetIDByFileName(NULL);
  HDD_TAP_GetIDByIndex(0);
  HDD_TAP_GetIndexByID(0);
  HDD_TAP_GetInfo(0, NULL);
  HDD_TAP_GetStartParameter();
  HDD_TAP_isAnyRunning();
  HDD_TAP_isBatchMode();
  HDD_TAP_isDisabled(0);
  HDD_TAP_isDisabledAll();
  HDD_TAP_isRunning(0);
  HDD_TAP_SendEvent(0, FALSE, 0, 0, 0);
  HDD_TAP_SetCurrentDirCluster(0);
  HDD_TAP_Start(NULL, FALSE, NULL, NULL);
  HDD_TAP_StartedByTAP();
  HDD_TAP_Terminate(0);
  HDD_TouchFile(NULL);
  HDD_TranslateDirCluster(0, NULL);
  HDD_TruncateFile(NULL, 0);
  HDD_Write(NULL, 0, NULL);
  HDD_WriteClusterDMA(0, NULL);
  HDD_WriteSectorDMA(0, 0, NULL);
  HookEnable(0, 0);
  HookExit();
  HookIsEnabled(0);
  HookMIPS_Clear(0, 0, 0);
  HookMIPS_Set(0, 0, 0);
  HookSet(0, 0);
  IMEM_Alloc(0);
  IMEM_Init(0);
  IMEM_isInitialized();
  IMEM_Compact();
  IMEM_Free(NULL);
  IMEM_GetInfo(NULL, NULL);
  IMEM_Kill();
  InfoTestGrid();
  INICloseFile();
  INIFindStartEnd(NULL, NULL, NULL, 0);
  INIGetARGB(NULL, NULL, NULL, NULL, NULL, 0);
  INIGetHexByte(NULL, 0, 0, 0);
  INIGetHexDWord(NULL, 0, 0, 0);
  INIGetHexWord(NULL, 0, 0, 0);
  INIGetInt(NULL, 0, 0, 0);
  INIGetString(NULL, NULL, NULL, 0);
  INIKillKey(NULL);
  INIOpenFile(NULL);
  INISaveFile(NULL);
  INISetARGB(NULL, 0, 0, 0, 0);
  INISetComment(NULL);
  INISetHexByte(NULL, 0);
  INISetHexDWord(NULL, 0);
  INISetHexWord(NULL, 0);
  INISetInt(NULL, 0);
  INISetString(NULL, NULL);
  initCodeWrapper(0);
  InitTAPAPIFix();
  InitTAPex();
  InteractiveGetStatus();
  InteractiveSetStatus(FALSE);
  intLock();
  intUnlock(0);
  isAnyOSDVisible(0, 0, 0, 0);
  isLegalChar(0, 0);
  isMasterpiece();
  isMPMenu();
  iso639_1(0);
  isOSDRegionAlive(0);
  isValidChannel(NULL);
  LangGetString(0);
  LangLoadStrings(NULL, 0, 0);
  LangUnloadStrings();
  Log(NULL, NULL, FALSE, 0, NULL);
  LowerCase(NULL);
  MakeValidFileName(NULL, 0);
  MHEG_Status();
  MPDisplayClearDisplay();
  MPDisplayClearSegments(0, 0);
  MPDisplayDisplayLongString(NULL);
  MPDisplayDisplayShortString(NULL);
  MPDisplayGetDisplayByte(0);
  MPDisplayGetDisplayMask(0);
  MPDisplayInstallMPDisplayFwHook();
  MPDisplaySetAmFlag(0);
  MPDisplaySetColonFlag(0);
  MPDisplaySetDisplayByte(0, 0);
  MPDisplaySetDisplayMask(0, 0);
  MPDisplaySetDisplayMemory(NULL);
  MPDisplaySetDisplayMode(0);
  MPDisplaySetPmFlag(0);
  MPDisplaySetSegments(0, 0);
  MPDisplayToggleSegments(0, 0);
  MPDisplayUninstallMPDisplayFwHook();
  MPDisplayUpdateDisplay();
  Now(NULL);
  OSDCopy(0, 0, 0, 0, 0, 0, 0);
  OSDLinesForeDirty(FALSE);
  ParseLine(NULL, NULL, 0);
  ProfileDirty();
  ProfileInit();
  ProfileLoad(NULL, FALSE);
  ProfileMayReload();
  ReadEEPROM(0, 0, NULL);
  ReadIICRegister(0, 0, 0, 0, NULL);
  Reboot(0);
  ReceiveSector(0);
  RTrim(NULL);
  SaveBitmap(NULL, 0, 0, NULL);
  SendEvent(0, 0, 0, 0);
  SendEventHelper(NULL, 0, 0, 0);
  SendHDDCommand(0, 0, 0, 0, 0, 0, 0);
  SendToFP(NULL);
  SeparatePathComponents(NULL, NULL, NULL, NULL);
  SetCrashBehaviour(0);
  setSymbol14(0, 0);
  setSymbol17(0, 0);
  ShowMessageWin(NULL, NULL, NULL, 0);
  ShowMessageWindow(NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  Shutdown(0);
  SoundSinus(0, 0, 0);
  StrEndsWith(NULL, NULL);
  stricstr(NULL, NULL);
  SubtitleGetStatus();
  SubtitleSetStatus(FALSE);
  SuppressedAutoStart();
  SwapDWords(0);
  SwapWords(0);
  TAP_Osd_PutFreeColorGd(0, 0, 0, NULL, FALSE, 0);
  TAPCOM_CloseChannel(NULL);
  TAPCOM_Finish(NULL, 0);
  TAPCOM_GetChannel(0, NULL, NULL, NULL, NULL);
  TAPCOM_GetReturnValue(NULL);
  TAPCOM_GetStatus(NULL);
  TAPCOM_LastAlive(NULL);
  TAPCOM_OpenChannel(0, 0, 0, NULL);
  TAPCOM_Reject(NULL);
  TAPCOM_StillAlive(NULL);
  TFDSize(NULL);
  TimeDiff(0, 0);
  TimeFormat(0, 0, 0);
  TunerGet(0);
  TunerSet(0);
  UncompressBlock(NULL, 0, NULL, 0);
  UncompressedFirmwareSize(NULL);
  UncompressedLoaderSize(NULL);
  UncompressedTFDSize(NULL);
  UncompressFirmware(NULL, NULL, NULL);
  UncompressLoader(NULL, NULL, NULL);
  UncompressTFD(NULL, NULL, NULL);
  UpperCase(NULL);
  ValidFileName(NULL, 0);
  WindowDirty();
  WriteIICRegister(0, 0, 0, 0, NULL);
  YUV2RGB(0, 0, 0, NULL, NULL, NULL);
  YUV2RGB2(0, 0, 0, NULL, NULL, NULL);

  return 0;
}
示例#17
0
float MotionGraphController::getValue(CHANNEL_ID _channel, float _time){
	//if it is not transitioning and its time to loop
	if (!status.isTransitioning &&  timeToTransition(_time))
	{
		//iterateStatus();
		int frame3 = computeCurrentFrame(_time);
		MotionSequence *motion_sequence = returnMotionSequenceContainerFromID(status.SeqID).MS;
		if (motion_sequence == NULL)
			throw AnimationException("MotionSequenceController has no attached MotionSequence");

		if (!isValidChannel(_channel, _time))
		{
			string s = string("MotionSequenceController received request for invalid channel ")
				+ " bone: " + toString(_channel.bone_id) + " dof: " + toString(_channel.channel_type);
			throw AnimationException(s.c_str());
		}

//		int frame3 = computeCurrentFrame(_time);
		//set this for currentFrameCalculations
		last_transition_time = _time;
		last_transition_frame = status.FrameNumberTransitionTo;
		// set the frame number to the frame we transition to.
		status.FrameNumber = status.FrameNumberTransitionTo;

	//	int frame3 = computeCurrentFrame(_time);
		float value = motion_sequence->getValue(_channel, computeCurrentFrame(_time));

		//transition the graph using status information
		// only use when we have matching names of Motion sequences are the same as the filenames of the frames on the graph
		// in this case we need to put the vertex descriptor back to its original spot
		//transitionGraph();
		printStatus();
		//update the status
		iterateStatus();
		printStatus();
		return(value);

	}
	else if (status.isTransitioning &&  timeToTransition(_time))
	{
		MotionSequence *motion_sequence = returnMotionSequenceContainerFromID(status.TransitionToSeqId).MS;
		if (motion_sequence == NULL)
			throw AnimationException("MotionSequenceController has no attached MotionSequence");

		if (!isValidChannel(_channel, _time))
		{
			string s = string("MotionSequenceController received request for invalid channel ")
				+ " bone: " + toString(_channel.bone_id) + " dof: " + toString(_channel.channel_type);
			throw AnimationException(s.c_str());
		}
		//set this for currentFrameCalculations
		last_transition_time = _time;
		last_transition_frame = status.FrameNumberTransitionTo;
		// set the frame number to the frame we transition to.
		status.FrameNumber = status.FrameNumberTransitionTo;

		int frame3 = computeCurrentFrame(_time);
		float value = motion_sequence->getValue(_channel, computeCurrentFrame(_time));

		//transition the graph using status information
		// only use when we have matching names of Motion sequences are the same as the filenames of the frames on the graph
		//transitionGraph();
		printStatus();
		//update the status
		iterateStatus();
		printStatus();
		return(value);
	}
	//not at right time to transition
	else{
		MotionSequence *motion_sequence = returnMotionSequenceContainerFromID(status.SeqID).MS;

		if (motion_sequence == NULL)
			throw AnimationException("MotionSequenceController has no attached MotionSequence");

		if (!isValidChannel(_channel, _time))
		{
			string s = string("MotionSequenceController received request for invalid channel ")
				+ " bone: " + toString(_channel.bone_id) + " dof: " + toString(_channel.channel_type);
			throw AnimationException(s.c_str());
		}
		int frame3 = computeCurrentFrame(_time);
		float value = motion_sequence->getValue(_channel, computeCurrentFrame(_time));
		if (frame3 > status.FrameNumber)
		{

			//printStatus();
		}

		//update status
		status.FrameNumber = frame3;

		// only use when we have matching names of Motion sequences are the same as the filenames of the frames on the graph
		//iterate graph
		//iterateMotionGraph();
	
		return(value);
	}
}