示例#1
0
bool Multiplexer::CreateAndRestoreSavedStreamProperties()
{
    DataStream *dstr = new DataStream( this,
                                       port_save,
                                       baud_rate_save,
                                       port_type_save,
                                       priority_save,
                                       bGarmin_GRMN_mode_save
                                     );
    dstr->SetInputFilter(input_sentence_list_save);
    dstr->SetInputFilterType(input_sentence_list_type_save);
    dstr->SetOutputFilter(output_sentence_list_save);
    dstr->SetOutputFilterType(output_sentence_list_type_save);
    dstr->SetChecksumCheck(bchecksum_check_save);

    AddStream(dstr);

    return true;
}
示例#2
0
void Multiplexer::StartAllStreams( void )
{
    for ( size_t i = 0; i < g_pConnectionParams->Count(); i++ )
    {
        ConnectionParams *cp = g_pConnectionParams->Item(i);
        if( cp->bEnabled ) {

#ifdef __WXGTK__
            if( cp->GetDSPort().Contains(_T("Serial"))) {
                if( ! g_bserial_access_checked ){
                    if( !CheckSerialAccess() ){
                    }
                    g_bserial_access_checked = true;
                }
            }
#endif

            dsPortType port_type = cp->IOSelect;
            DataStream *dstr = new DataStream( this,
                                               cp->Type,
                                               cp->GetDSPort(),
                                               wxString::Format(wxT("%i"),cp->Baudrate),
                                               port_type,
                                               cp->Priority,
                                               cp->Garmin
                                               );
                                               dstr->SetInputFilter(cp->InputSentenceList);
                                               dstr->SetInputFilterType(cp->InputSentenceListType);
                                               dstr->SetOutputFilter(cp->OutputSentenceList);
                                               dstr->SetOutputFilterType(cp->OutputSentenceListType);
                                               dstr->SetChecksumCheck(cp->ChecksumCheck);

            cp->b_IsSetup = true;

            AddStream(dstr);
        }
    }

}