//
// Valori Strumento FSP "
http://www.rohde-schwarz.it/it/prodotti/test_and_measurement/spectrum_analysis/FSP-|--|-100-|-6394.html"
//
char KeyString [] = {"0123456789"}; // Opzione originale ottenuta da "Rohde & Schwarz", per verifica funzionamento Keygen
char SerString [] = {"xxxxxx/xxx"}; // Seriale dello strumento
//
// Programma Calcolo Codici Opzioni FSP
//
int main(void)
{
unsigned long key;
unsigned long opzione;
option_type * option = option_list;
//
// Test funzionamento con opzione valida
//
// Decodifica Opzione
opzione = decrypt(KeyString, SerString);
// Codifica Opzione
key = encrypt(option->raw_option, SerString);
//
// Calcolo tutte le opzioni "Funzionanti" per Seriale
//
// Per tutte le opzioni dispinibili
while (option->raw_option)
{
// Controllo se opzione valida
if(option->valid_option == TRUE)
{
// Calcolo chiave
key = encrypt(option->raw_option, SerString);
// Stampo valore opzione da immettere nello strumento
printf("%010lu - %s\r\n", key, option->descr_option);
}
// Opzione successiva
option++;
}
}