increase the probability of valid instrument picture

This commit is contained in:
Volker Fischer 2014-02-13 21:01:15 +00:00
parent bab6152f8c
commit 4837dc88d4

View file

@ -107,20 +107,20 @@ public slots:
// generate random protocol message // generate random protocol message
switch ( GenRandomIntInRange ( 0, 24 ) ) switch ( GenRandomIntInRange ( 0, 24 ) )
{ {
case 0: case 0: // PROTMESSID_JITT_BUF_SIZE
Protocol.CreateJitBufMes ( GenRandomIntInRange ( 0, 10 ) ); Protocol.CreateJitBufMes ( GenRandomIntInRange ( 0, 10 ) );
break; break;
case 1: case 1: // PROTMESSID_REQ_JITT_BUF_SIZE
Protocol.CreateReqJitBufMes(); Protocol.CreateReqJitBufMes();
break; break;
case 2: case 2: // PROTMESSID_CHANNEL_GAIN
Protocol.CreateChanGainMes ( GenRandomIntInRange ( 0, 20 ), Protocol.CreateChanGainMes ( GenRandomIntInRange ( 0, 20 ),
GenRandomIntInRange ( -100, 100 ) ); GenRandomIntInRange ( -100, 100 ) );
break; break;
case 3: case 3: // PROTMESSID_CONN_CLIENTS_LIST_NAME
vecChanInfo[0].iChanID = GenRandomIntInRange ( -2, 20 ); vecChanInfo[0].iChanID = GenRandomIntInRange ( -2, 20 );
vecChanInfo[0].iIpAddr = GenRandomIntInRange ( 0, 100000 ); vecChanInfo[0].iIpAddr = GenRandomIntInRange ( 0, 100000 );
vecChanInfo[0].strName = GenRandomString(); vecChanInfo[0].strName = GenRandomString();
@ -128,7 +128,7 @@ public slots:
Protocol.CreateConClientListNameMes ( vecChanInfo ); Protocol.CreateConClientListNameMes ( vecChanInfo );
break; break;
case 4: case 4: // PROTMESSID_CONN_CLIENTS_LIST
vecChanInfo[0].iChanID = GenRandomIntInRange ( -2, 20 ); vecChanInfo[0].iChanID = GenRandomIntInRange ( -2, 20 );
vecChanInfo[0].iIpAddr = GenRandomIntInRange ( 0, 100000 ); vecChanInfo[0].iIpAddr = GenRandomIntInRange ( 0, 100000 );
vecChanInfo[0].strName = GenRandomString(); vecChanInfo[0].strName = GenRandomString();
@ -136,37 +136,37 @@ public slots:
Protocol.CreateConClientListMes ( vecChanInfo ); Protocol.CreateConClientListMes ( vecChanInfo );
break; break;
case 5: case 5: // PROTMESSID_REQ_CONN_CLIENTS_LIST
Protocol.CreateReqConnClientsList(); Protocol.CreateReqConnClientsList();
break; break;
case 6: case 6: // PROTMESSID_CHANNEL_NAME
Protocol.CreateChanNameMes ( GenRandomString() ); Protocol.CreateChanNameMes ( GenRandomString() );
break; break;
case 7: case 7: // PROTMESSID_CHANNEL_INFOS
ChannelCoreInfo.eCountry = ChannelCoreInfo.eCountry =
static_cast<QLocale::Country> ( GenRandomIntInRange ( 0, 100 ) ); static_cast<QLocale::Country> ( GenRandomIntInRange ( 0, 100 ) );
ChannelCoreInfo.eSkillLevel = ChannelCoreInfo.eSkillLevel =
static_cast<ESkillLevel> ( GenRandomIntInRange ( 0, 3 ) ); static_cast<ESkillLevel> ( GenRandomIntInRange ( 0, 3 ) );
ChannelCoreInfo.iInstrument = GenRandomIntInRange ( 0, 100000 ); ChannelCoreInfo.iInstrument = GenRandomIntInRange ( 0, 100 );
ChannelCoreInfo.strCity = GenRandomString(); ChannelCoreInfo.strCity = GenRandomString();
ChannelCoreInfo.strName = GenRandomString(); ChannelCoreInfo.strName = GenRandomString();
Protocol.CreateChanInfoMes ( ChannelCoreInfo ); Protocol.CreateChanInfoMes ( ChannelCoreInfo );
break; break;
case 8: case 8: // PROTMESSID_REQ_CHANNEL_INFOS
Protocol.CreateReqChanInfoMes(); Protocol.CreateReqChanInfoMes();
break; break;
case 9: case 9: // PROTMESSID_CHAT_TEXT
Protocol.CreateChatTextMes ( GenRandomString() ); Protocol.CreateChatTextMes ( GenRandomString() );
break; break;
case 10: case 10: // PROTMESSID_NETW_TRANSPORT_PROPS
NetTrProps.eAudioCodingType = NetTrProps.eAudioCodingType =
static_cast<EAudComprType> ( GenRandomIntInRange ( 0, 2 ) ); static_cast<EAudComprType> ( GenRandomIntInRange ( 0, 2 ) );
@ -180,30 +180,30 @@ public slots:
Protocol.CreateNetwTranspPropsMes ( NetTrProps ); Protocol.CreateNetwTranspPropsMes ( NetTrProps );
break; break;
case 11: case 11: // PROTMESSID_REQ_NETW_TRANSPORT_PROPS
Protocol.CreateReqNetwTranspPropsMes(); Protocol.CreateReqNetwTranspPropsMes();
break; break;
case 12: case 12: // PROTMESSID_OPUS_SUPPORTED
Protocol.CreateOpusSupportedMes(); Protocol.CreateOpusSupportedMes();
break; break;
case 13: case 13: // PROTMESSID_CLM_PING_MS
Protocol.CreateCLPingMes ( CurHostAddress, Protocol.CreateCLPingMes ( CurHostAddress,
GenRandomIntInRange ( -2, 1000 ) ); GenRandomIntInRange ( -2, 1000 ) );
break; break;
case 14: case 14: // PROTMESSID_CLM_PING_MS_WITHNUMCLIENTS
Protocol.CreateCLPingWithNumClientsMes ( CurHostAddress, Protocol.CreateCLPingWithNumClientsMes ( CurHostAddress,
GenRandomIntInRange ( -2, 1000 ), GenRandomIntInRange ( -2, 1000 ),
GenRandomIntInRange ( -2, 1000 ) ); GenRandomIntInRange ( -2, 1000 ) );
break; break;
case 15: case 15: // PROTMESSID_CLM_SERVER_FULL
Protocol.CreateCLServerFullMes ( CurHostAddress ); Protocol.CreateCLServerFullMes ( CurHostAddress );
break; break;
case 16: case 16: // PROTMESSID_CLM_REGISTER_SERVER
ServerInfo.bPermanentOnline = ServerInfo.bPermanentOnline =
static_cast<bool> ( GenRandomIntInRange ( 0, 1 ) ); static_cast<bool> ( GenRandomIntInRange ( 0, 1 ) );
@ -220,11 +220,11 @@ public slots:
ServerInfo ); ServerInfo );
break; break;
case 17: case 17: // PROTMESSID_CLM_UNREGISTER_SERVER
Protocol.CreateCLUnregisterServerMes ( CurHostAddress ); Protocol.CreateCLUnregisterServerMes ( CurHostAddress );
break; break;
case 18: case 18: // PROTMESSID_CLM_SERVER_LIST
vecServerInfo[0].bPermanentOnline = vecServerInfo[0].bPermanentOnline =
static_cast<bool> ( GenRandomIntInRange ( 0, 1 ) ); static_cast<bool> ( GenRandomIntInRange ( 0, 1 ) );
@ -242,24 +242,24 @@ public slots:
vecServerInfo ); vecServerInfo );
break; break;
case 19: case 19: // PROTMESSID_CLM_REQ_SERVER_LIST
Protocol.CreateCLReqServerListMes ( CurHostAddress ); Protocol.CreateCLReqServerListMes ( CurHostAddress );
break; break;
case 20: case 20: // PROTMESSID_CLM_SEND_EMPTY_MESSAGE
Protocol.CreateCLSendEmptyMesMes ( CurHostAddress, Protocol.CreateCLSendEmptyMesMes ( CurHostAddress,
CurHostAddress ); CurHostAddress );
break; break;
case 21: case 21: // PROTMESSID_CLM_EMPTY_MESSAGE
Protocol.CreateCLEmptyMes ( CurHostAddress ); Protocol.CreateCLEmptyMes ( CurHostAddress );
break; break;
case 22: case 22: // PROTMESSID_CLM_DISCONNECTION
Protocol.CreateCLDisconnection ( CurHostAddress ); Protocol.CreateCLDisconnection ( CurHostAddress );
break; break;
case 23: case 23: // PROTMESSID_ACKN
Protocol.CreateAndImmSendAcknMess ( GenRandomIntInRange ( -10, 100 ), Protocol.CreateAndImmSendAcknMess ( GenRandomIntInRange ( -10, 100 ),
GenRandomIntInRange ( -100, 100 ) ); GenRandomIntInRange ( -100, 100 ) );
break; break;