forked from psi46/psi46test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
protocol.h
42 lines (36 loc) · 873 Bytes
/
protocol.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* -------------------------------------------------------------
*
* file: protocol.h
*
* description: log file for PSI46V1 Wafer tester
*
* author: Beat Meier
* modified: 24.1.2004
*
* rev:
*
* -------------------------------------------------------------
*/
#ifndef PROTOCOL_H
#define PROTOCOL_H
#include <stdio.h>
#include <string>
class CProtocol
{
FILE *f;
public:
CProtocol() { f = NULL; }
~CProtocol() { close(); }
bool open(const char filename[]);
bool append(const char filename[]);
void close();
void timestamp(const char s[]);
void section(const char s[], bool crlf = true);
void section(const char s[], const char par[]);
void puts(const char s[]);
void puts(const std::string s);
void printf(const char *fmt, ...);
void flush();
FILE* File() { return f; }
};
#endif