aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Communication/PMR/MachineStatus/StartMachineStatusUpdateRequest.pb-c.h
blob: e336e7f0fd14ce7947c7c777ec5b2f280813efbb (plain)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
/* Generated from: StartMachineStatusUpdateRequest.proto */

#ifndef PROTOBUF_C_StartMachineStatusUpdateRequest_2eproto__INCLUDED
#define PROTOBUF_C_StartMachineStatusUpdateRequest_2eproto__INCLUDED

#include <protobuf-c/protobuf-c.h>

PROTOBUF_C__BEGIN_DECLS

#if PROTOBUF_C_VERSION_NUMBER < 1003000
# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION
# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
#endif


typedef struct _StartMachineStatusUpdateRequest StartMachineStatusUpdateRequest;


/* --- enums --- */


/* --- messages --- */

struct  _StartMachineStatusUpdateRequest
{
  ProtobufCMessage base;
};
#define START_MACHINE_STATUS_UPDATE_REQUEST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&start_machine_status_update_request__descriptor) \
     }


/* StartMachineStatusUpdateRequest methods */
void   start_machine_status_update_request__init
                     (StartMachineStatusUpdateRequest         *message);
size_t start_machine_status_update_request__get_packed_size
                     (const StartMachineStatusUpdateRequest   *message);
size_t start_machine_status_update_request__pack
                     (const StartMachineStatusUpdateRequest   *message,
                      uint8_t             *out);
size_t start_machine_status_update_request__pack_to_buffer
                     (const StartMachineStatusUpdateRequest   *message,
                      ProtobufCBuffer     *buffer);
StartMachineStatusUpdateRequest *
       start_machine_status_update_request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   start_machine_status_update_request__free_unpacked
                     (StartMachineStatusUpdateRequest *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*StartMachineStatusUpdateRequest_Closure)
                 (const StartMachineStatusUpdateRequest *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCMessageDescriptor start_machine_status_update_request__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_StartMachineStatusUpdateRequest_2eproto__INCLUDED */
: base() { } #endregion #region Properties /// <summary> /// Gets or sets the graph marker color. /// </summary> public Brush MarkerColor { get { return (Brush)GetValue(MarkerColorProperty); } set { SetValue(MarkerColorProperty, value); } } public static readonly DependencyProperty MarkerColorProperty = DependencyProperty.Register("MarkerBrush", typeof(Brush), typeof(RealTimeGraphExReachMultiLineErase), new PropertyMetadata(Brushes.Red, new PropertyChangedCallback(CrossModelChanged))); /// <summary> /// Gets or sets whether to display the marker on the graph. /// </summary> public bool ShowMarker { get { return (bool)GetValue(ShowMarkerProperty); } set { SetValue(ShowMarkerProperty, value); } } public static readonly DependencyProperty ShowMarkerProperty = DependencyProperty.Register("ShowMarker", typeof(bool), typeof(RealTimeGraphExReachMultiLineErase), new PropertyMetadata(true, new PropertyChangedCallback(CrossModelChanged))); #endregion #region Override Methods protected override void Initialize() { base.Initialize(); marker = new Rectangle() { VerticalAlignment = System.Windows.VerticalAlignment.Stretch, Width = 1, Fill = MarkerColor, HorizontalAlignment = System.Windows.HorizontalAlignment.Left, Margin = new Thickness(-2, 0, 0, 0) }; if (!gridLinesAndImageWrapperGrid.Children.Contains(marker)) { gridLinesAndImageWrapperGrid.Children.Add(marker); } } protected override void OnSetCrossThreadFields() { base.OnSetCrossThreadFields(); this.Dispatcher.Invoke(() => { _markerColor = MarkerColor; _showMarker = ShowMarker; }, System.Windows.Threading.DispatcherPriority.Send); } protected override void OnClearGraph() { base.OnClearGraph(); _currentReplaceIndex = 0; _endReached = false; this.Dispatcher.Invoke(() => { marker.RenderTransform = new TranslateTransform(0, 0); }); } protected internal override void OnRenderGraph() { if (_graphController != null && _graphController.dataSeriesCollection.Count > 0 && _graphController.TotalPoints > 0 && _width > 1 && _height > 1) { for (int i = 0; i < _graphController.dataSeriesCollection[0].Points.Count; i++) //Match { if (xValueCounter <= _width) { if (!_endReached) { for (int j = 0; j < _graphController.dataSeriesCollection.Count; j++) { double value = _graphController.dataSeriesCollection[j].Points[i]; double valuePrecentage = value; _graphPolygons[j].Add(xValueCounter, valuePrecentage, value); } xValueCounter += _scaleFactor; } else { for (int j = 0; j < _graphController.dataSeriesCollection.Count; j++) { double value = _graphController.dataSeriesCollection[j].Points[i]; double valuePrecentage = value; _graphPolygons[j].Replace(xValueCounter, valuePrecentage, value, _currentReplaceIndex); if (j == _graphController.dataSeriesCollection.Count - 1) { _currentReplaceIndex++; } } xValueCounter += _scaleFactor; if (_currentReplaceIndex > _graphPolygons[0].TotalPoints - 1) { xValueCounter = 0; _currentReplaceIndex = 0; } } } else { _endReached = true; xValueCounter = 0; for (int j = 0; j < _graphController.dataSeriesCollection.Count; j++) { double value = _graphController.dataSeriesCollection[j].Points[i]; double valuePrecentage = value; _graphPolygons[j].Replace(xValueCounter, valuePrecentage, value, _currentReplaceIndex); if (j == _graphController.dataSeriesCollection.Count - 1) { _currentReplaceIndex++; } } xValueCounter += _scaleFactor; } } updateCounter++; if (updateCounter >= 1 && !_isPaused) { OnDrawVisuals(); } } } protected override void OnDrawVisuals() { base.OnDrawVisuals(); if (_graphPolygons.Count > 0) { double scale = _width / (_graphPolygons[0].TotalPoints - 1); this.Dispatcher.Invoke(() => { marker.RenderTransform = new TranslateTransform((_currentReplaceIndex * scale) - 2, 0); }); } } #endregion } }