-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathMpi.h
55 lines (45 loc) · 1.21 KB
/
Mpi.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
43
44
45
46
47
48
49
50
51
52
53
54
55
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MPI_H
#define MPI_H
typedef void* MPI_HANDLE;
// Plus any error codes from errno.h
#define MPI_OK 0
// Not null terminated, UTF-8, JSON formatted string
typedef char* MPI_JSON_STRING;
#ifdef __cplusplus
extern "C"
{
#endif
MPI_HANDLE MpiOpen(
const char* clientName,
const unsigned int maxPayloadSizeBytes);
int MpiSet(
MPI_HANDLE clientSession,
const char* componentName,
const char* objectName,
const MPI_JSON_STRING payload,
const int payloadSizeBytes);
int MpiGet(
MPI_HANDLE clientSession,
const char* componentName,
const char* objectName,
MPI_JSON_STRING* payload,
int* payloadSizeBytes);
int MpiSetDesired(
MPI_HANDLE clientSession,
const MPI_JSON_STRING payload,
const int payloadSizeBytes);
int MpiGetReported(
MPI_HANDLE clientSession,
MPI_JSON_STRING* payload,
int* payloadSizeBytes);
void MpiClose(MPI_HANDLE clientSession);
void MpiFree(MPI_JSON_STRING payload);
void MpiInitialize(void);
void MpiDoWork(void);
void MpiShutdown(void);
#ifdef __cplusplus
}
#endif
#endif // MPI_H