aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValueComponentState.pb-c.c
blob: 0dfc42f2c8e99ed8a0569f3de536ba6ddb89c34e (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
/* Generated from: ValueComponentState.proto */

/* Do not generate deprecated warnings for self */
#ifndef PROTOBUF_C__NO_DEPRECATED
#define PROTOBUF_C__NO_DEPRECATED
#endif

#include "ValueComponentState.pb-c.h"
void   value_component_state__init
                     (ValueComponentState         *message)
{
  static const ValueComponentState init_value = VALUE_COMPONENT_STATE__INIT;
  *message = init_value;
}
size_t value_component_state__get_packed_size
                     (const ValueComponentState *message)
{
  assert(message->base.descriptor == &value_component_state__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t value_component_state__pack
                     (const ValueComponentState *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &value_component_state__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t value_component_state__pack_to_buffer
                     (const ValueComponentState *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &value_component_state__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
ValueComponentState *
       value_component_state__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (ValueComponentState *)
     protobuf_c_message_unpack (&value_component_state__descriptor,
                                allocator, len, data);
}
void   value_component_state__free_unpacked
                     (ValueComponentState *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &value_component_state__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
static const ProtobufCFieldDescriptor value_component_state__field_descriptors[2] =
{
  {
    "Component",
    1,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_ENUM,
    offsetof(ValueComponentState, has_component),
    offsetof(ValueComponentState, component),
    &value_component__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "Value",
    2,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_DOUBLE,
    offsetof(ValueComponentState, has_value),
    offsetof(ValueComponentState, value),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned value_component_state__field_indices_by_name[] = {
  0,   /* field[0] = Component */
  1,   /* field[1] = Value */
};
static const ProtobufCIntRange value_component_state__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 2 }
};
const ProtobufCMessageDescriptor value_component_state__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "ValueComponentState",
  "ValueComponentState",
  "ValueComponentState",
  "",
  sizeof(ValueComponentState),
  2,
  value_component_state__field_descriptors,
  value_component_state__field_indices_by_name,
  1,  value_component_state__number_ranges,
  (ProtobufCMessageInit) value_component_state__init,
  NULL,NULL,NULL    /* reserved[123] */
};
lass="o">< 2) return; if (innerGrid == null) { innerGrid = new Grid(); } double animationTime = animate ? 0.2 : 0; Grid grid = innerGrid; DoubleAnimation heightAnimation = new DoubleAnimation() { Duration = new Duration(TimeSpan.FromSeconds(animationTime)) }; heightAnimation.To = double.IsNaN(Graph.gridLinesAndImageWrapperGrid.Height) ? Graph.gridLinesAndImageWrapperGrid.ActualHeight : Graph.gridLinesAndImageWrapperGrid.Height; if (!double.IsNaN(grid.Height)) { grid.BeginAnimation(Grid.HeightProperty, heightAnimation); } else { grid.Height = Graph.gridLinesAndImageWrapperGrid.ActualHeight; } grid.VerticalAlignment = System.Windows.VerticalAlignment.Top; ThicknessAnimation marginAni = new ThicknessAnimation() { Duration = new Duration(TimeSpan.FromSeconds(animationTime)) }; marginAni.To = new Thickness(0, Graph.gridLinesAndImageWrapperGrid.Margin.Top, 0, 0); if (!double.IsNaN(grid.Height)) { grid.BeginAnimation(MarginProperty, marginAni); } else { grid.Margin = new Thickness(0, Graph.gridLinesAndImageWrapperGrid.Margin.Top, 0, 0); } double height = double.IsNaN(Graph.gridLinesAndImageWrapperGrid.Height) ? Graph.gridLinesAndImageWrapperGrid.ActualHeight : Graph.gridLinesAndImageWrapperGrid.Height; int smallTicks = (int)Math.Round((SmallTicks * (((height * 100) / Graph.gridMain.ActualHeight) / 100)), MidpointRounding.ToEven); this.Content = grid; this.ClipToBounds = true; grid.RowDefinitions.Clear(); grid.Children.Clear(); int bigTickCounter = BigTicks; for (int i = 0; i < smallTicks; i++) { RowDefinition rowTick = new RowDefinition(); rowTick.Height = new GridLength(1, GridUnitType.Star); grid.RowDefinitions.Add(rowTick); if (i == bigTickCounter) { YAxisBigTick bigTick = new YAxisBigTick(); bigTick.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch; bigTick.VerticalAlignment = System.Windows.VerticalAlignment.Top; if (BigTickTemplate != null) { bigTick.ContentTemplate = BigTickTemplate; } bigTickCounter += BigTicks; grid.Children.Add(bigTick); Grid.SetRow(bigTick, i); } else { YAxisSmallTick smallTick = new YAxisSmallTick(); smallTick.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch; smallTick.VerticalAlignment = System.Windows.VerticalAlignment.Top; if (SmallTickTemplate != null) { smallTick.ContentTemplate = SmallTickTemplate; } grid.Children.Add(smallTick); Grid.SetRow(smallTick, i); } } //Add last tick YAxisSmallTick lastTick = new YAxisSmallTick(); lastTick.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch; lastTick.VerticalAlignment = System.Windows.VerticalAlignment.Bottom; if (SmallTickTemplate != null) { lastTick.ContentTemplate = SmallTickTemplate; } grid.Children.Add(lastTick); Grid.SetRow(lastTick, smallTicks - 1); } protected override void OnGraphZoomComplete(Point transformOrigin, double scaleX, double scaleY) { Render(Graph, true); } protected override void OnGraphPanningComplete(Point translate) { if (innerGrid != null) { var renderBounds = Graph.GetGraphRenderBounds(); innerGrid.BeginAnimation(MarginProperty, null); innerGrid.Margin = new Thickness(0, Graph.gridLinesAndImageWrapperGrid.Margin.Top, 0, 0); } } } }