HO NECESSITA' DI UN'AIUTO

HO NECESSITA' DI UN'AIUTO

olifede
Not applicable
10 Views
1 Reply
Message 1 of 2

HO NECESSITA' DI UN'AIUTO

olifede
Not applicable

[ FlexSim 19.0.0 ]

Sto sviluppando un progetto per l'università che riguarda la misurazione dell'ECG attraverso arduino e devo rappresentarlo su Flexsim. CODICE PER IL PROCESS FLOW DELL'HOLTER:

// Custom Code nel Process Flow dell'Holter

Object current = param(1);

treenode activity = param(2);

Token token = param(3);


// Genera un numero seriale casuale per l'holter

char chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";

char numeroSerialeHolter[7]; // 6 caratteri + 1 per il terminatore nullo


for (int i = 0; i < 6; i++) {

int randomIndex = rand() % (sizeof(chars) - 1);

numeroSerialeHolter = chars[randomIndex];

}

numeroSerialeHolter[6] = '\0'; // Terminatore nullo per la stringa


// Assegna il numero seriale come label all'holter

setlabel(current, "NumeroSeriale", numeroSerialeHolter);


// Salva il riferimento dell'holter nel token per l'uso successivo

setnodetoken(token, "holterRef", current);

CODICE PER LA CONSEGNA DELL'HOLTER:

// Custom Code nel Process Flow di Visita

Object current = param(1); // Il paziente

treenode activity = param(2);

Token token = param(3);

treenode processFlow = ownerobject(activity);


// Cerca il token dell'holter nel process flow

treenode holterToken = findtoken(processFlow, "Holter");


// Se il token dell'holter è trovato

if (holterToken != NULL) {

// Ottieni il riferimento dell'holter dal token

Object holter = getnodetoken(holterToken, "holterRef");

// Assegna l'holter al paziente (puoi aggiungere il riferimento all'holter come etichetta al paziente)

setlabel(current, "Holter", holter);

// Log di conferma

msg("Holter con numero seriale %s assegnato al paziente.", getlabel(holter, "NumeroSeriale"));

}

SE QUALCUNO E' DISPONIBILE NELL'AIUTARMI. RINGRAZIO ANTICIPATAMENTE

0 Likes
11 Views
1 Reply
Reply (1)
Message 2 of 2

Jeanette_Fullmer
Community Manager
Community Manager

Hi @fede,

Please be aware that your FlexSim version is past its supported lifecycle and is no longer eligible for paid technical support. For more information, please see the article "Software Support Lifecycle".

Community members here may still be able to offer advice, but features have been added and bugs fixed in the time since your software version was released. You may find that an offered solution that works in more recent versions of the software is not compatible with your old version, or that a posted sample must be opened in a recent version.

Contact your local FlexSim distributor for information on upgrading or getting a trial license.

Good luck!

0 Likes