Skip to content

Commit

Permalink
Merge pull request #47 from EdgePi-Cloud/update-pb
Browse files Browse the repository at this point in the history
Update protobuf.
  • Loading branch information
josiah-tesfu authored Dec 6, 2023
2 parents 038def8 + d5e2ea0 commit 1fdaa5f
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 21 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"prepublishOnly": "npm run build"
},
"dependencies": {
"@edgepi-cloud/rpc-protobuf": "^1.0.16",
"@edgepi-cloud/edgepi-rpc-protobuf": "^1.0.24",
"@types/node": "^20.4.2",
"protobufjs": "^7.2.4",
"protobufjs-cli": "^1.1.1",
Expand Down
2 changes: 1 addition & 1 deletion src/services/AdcService/AdcEnums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
convMode, filterMode, adcNum, diffMode
} from './AdcTypes'

const protoPckgPath = path.join(require.resolve('@edgepi-cloud/rpc-protobuf'), '..')
const protoPckgPath = path.join(require.resolve('@edgepi-cloud/edgepi-rpc-protobuf'), '../edgepi_rpc_protos');

const root = protobuf.loadSync(path.join(protoPckgPath, 'adc.proto'))

Expand Down
2 changes: 1 addition & 1 deletion src/services/AdcService/AdcService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createConfigArgsList } from '../util/helpers'
import type { SuccessMsg } from '../serviceTypes/successMsg'
import type { TempReading, VoltageReadMsg, adc, adcConfig, diff } from './AdcTypes'

const protoPckgPath = path.join(require.resolve('@edgepi-cloud/rpc-protobuf'), '..');
const protoPckgPath = path.join(require.resolve('@edgepi-cloud/edgepi-rpc-protobuf'), '../edgepi_rpc_protos');

/**
* @constructor Adc class for calling EdgePi adc SDK methods through RPC
Expand Down
2 changes: 1 addition & 1 deletion src/services/DacService/DacChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'path'
import { DacChannels } from './DacTypes';

// Construct the path to the proto pacakge directory
const protoPckgPath = path.join(require.resolve('@edgepi-cloud/rpc-protobuf'),'..');
const protoPckgPath = path.join(require.resolve('@edgepi-cloud/edgepi-rpc-protobuf'), '../edgepi_rpc_protos');

const root = protobuf.loadSync(path.join(protoPckgPath, 'dac.proto'))
export const DACChannel = root.lookupEnum('DACChannels').values as unknown as DacChannels
2 changes: 1 addition & 1 deletion src/services/DacService/DacService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { serverResponse, serviceRequest } from '../../rpcChannel/ReqRepType
import type { DACChannel, GainStateMsg, GetState, State, StateMsg } from './DacTypes'
import { SuccessMsg } from '../serviceTypes/successMsg'

const protoPckgPath = path.join(require.resolve('@edgepi-cloud/rpc-protobuf'), '..');
const protoPckgPath = path.join(require.resolve('@edgepi-cloud/edgepi-rpc-protobuf'), '../edgepi_rpc_protos');

/**
* @constructor DacService class for calling EdgePi digital input SDK methods through RPC
Expand Down
2 changes: 1 addition & 1 deletion src/services/DinService/DinPins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'path'
import { DinPins } from './DinTypes';

// Construct the path to the proto pacakge directory
const protoPckgPath = path.join(require.resolve('@edgepi-cloud/rpc-protobuf'),'..');
const protoPckgPath = path.join(require.resolve('@edgepi-cloud/edgepi-rpc-protobuf'), '../edgepi_rpc_protos');

const root = protobuf.loadSync(path.join(protoPckgPath, 'din.proto'))
export const DINPins = root.lookupEnum('DinPins').values as unknown as DinPins
Expand Down
2 changes: 1 addition & 1 deletion src/services/DinService/DinService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { serverResponse, serviceRequest } from '../../rpcChannel/ReqRepType
import { DinPin } from './DinTypes'
import { StateMsg } from '../serviceTypes/stateMsg'

const protoPckgPath = path.join(require.resolve('@edgepi-cloud/rpc-protobuf'), '..');
const protoPckgPath = path.join(require.resolve('@edgepi-cloud/edgepi-rpc-protobuf'), '../edgepi_rpc_protos');

/**
* @constructor DinService class for calling EdgePi digital input SDK methods through RPC
Expand Down
2 changes: 1 addition & 1 deletion src/services/DoutService/DoutPins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as protobuf from 'protobufjs'
import path from 'path';
import { DoutPins } from './DoutTypes';

const protoPckgPath = path.join(require.resolve('@edgepi-cloud/rpc-protobuf'), '..');
const protoPckgPath = path.join(require.resolve('@edgepi-cloud/edgepi-rpc-protobuf'), '../edgepi_rpc_protos');

const root = protobuf.loadSync(path.join(protoPckgPath, 'dout.proto'))
export const DOUTPins = root.lookupEnum('DoutPins').values as unknown as DoutPins
2 changes: 1 addition & 1 deletion src/services/DoutService/DoutService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { DoutPin, DoutTriState } from './DoutTypes'
import { SuccessMsg } from '../serviceTypes/successMsg'

// Construct the path to the proto pacakge directory
const protoPckgPath = path.join(require.resolve('@edgepi-cloud/rpc-protobuf'), '..');
const protoPckgPath = path.join(require.resolve('@edgepi-cloud/edgepi-rpc-protobuf'), '../edgepi_rpc_protos');

/**
* @constructor DoutService class for calling EdgePi digital output SDK methods through RPC
Expand Down
2 changes: 1 addition & 1 deletion src/services/DoutService/DoutStates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as protobuf from 'protobufjs'
import path from 'path'
import { DoutTriStates } from './DoutTypes';

const protoPckgPath = path.join(require.resolve('@edgepi-cloud/rpc-protobuf'), '..');
const protoPckgPath = path.join(require.resolve('@edgepi-cloud/edgepi-rpc-protobuf'), '../edgepi_rpc_protos');
const root = protobuf.loadSync(path.join(protoPckgPath, 'dout.proto'))
const DoutTriState = root.lookupEnum('DoutTriState').values as unknown as DoutTriStates

Expand Down
2 changes: 1 addition & 1 deletion src/services/LedService/LedPins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'path'
import { LedPins } from './LedTypes';

// Construct the path to the proto pacakge directory
const protoPckgPath = path.join(require.resolve('@edgepi-cloud/rpc-protobuf'),'..');
const protoPckgPath = path.join(require.resolve('@edgepi-cloud/edgepi-rpc-protobuf'), '../edgepi_rpc_protos');

const root = protobuf.loadSync(path.join(protoPckgPath, 'led.proto'))
export const LEDPins = root.lookupEnum('LEDPins').values as unknown as LedPins
2 changes: 1 addition & 1 deletion src/services/LedService/LedService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { serverResponse, serviceRequest } from '../../rpcChannel/ReqRepType
import { LEDPin } from '../LedService/LedTypes'
import { SuccessMsg } from '../serviceTypes/successMsg'

const protoPckgPath = path.join(require.resolve('@edgepi-cloud/rpc-protobuf'), '..');
const protoPckgPath = path.join(require.resolve('@edgepi-cloud/edgepi-rpc-protobuf'), '../edgepi_rpc_protos');

/**
* @constructor LEDService class for calling EdgePi LED SDK methods through RPC
Expand Down
2 changes: 1 addition & 1 deletion src/services/RelayService/RelayService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { serverResponse, serviceRequest } from '../../rpcChannel/ReqRepType
import { SuccessMsg } from '../serviceTypes/successMsg';
import { StateMsg } from '../serviceTypes/stateMsg';

const protoPckgPath = path.join(require.resolve('@edgepi-cloud/rpc-protobuf'), '..');
const protoPckgPath = path.join(require.resolve('@edgepi-cloud/edgepi-rpc-protobuf'), '../edgepi_rpc_protos');

/**
* @constructor RelayService class for calling EdgePi LED SDK methods through RPC
Expand Down
2 changes: 1 addition & 1 deletion src/services/TcService/TcService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { RpcChannel } from '../../rpcChannel/RpcChannel'
import type { serverResponse, serviceRequest } from '../../rpcChannel/ReqRepTypes'
import type { TempReading } from './tcTypes'

const protoPckgPath = path.join(require.resolve('@edgepi-cloud/rpc-protobuf'), '..')
const protoPckgPath = path.join(require.resolve('@edgepi-cloud/edgepi-rpc-protobuf'), '../edgepi_rpc_protos');

/**
* @constructor TcService class for calling EdgePi thermocouple SDK methods through RPC
Expand Down

0 comments on commit 1fdaa5f

Please sign in to comment.