From fb5da5eef462992308031f1977bd27803d0712e0 Mon Sep 17 00:00:00 2001 From: agerlach <599421+agerlach@users.noreply.github.com> Date: Wed, 13 Nov 2024 17:37:59 +0000 Subject: [PATCH] Add Julia v1.11 Support --- src/templates/julia/LMCPFactory.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/templates/julia/LMCPFactory.jl b/src/templates/julia/LMCPFactory.jl index 87083d2..ba84b4a 100644 --- a/src/templates/julia/LMCPFactory.jl +++ b/src/templates/julia/LMCPFactory.jl @@ -17,7 +17,7 @@ const TEXT_CREATION_REGISTRY = Dict{Tuple{String, String}, DataType}() const LARGE_ARRAY_REGISTRY = Set{Tuple{DataType, Symbol}}() -function calculate_checksum(bytes::Vector{UInt8}) +function calculate_checksum(bytes::AbstractVector{UInt8}) checksum::UInt64 = 0 for byte in bytes checksum += byte @@ -44,7 +44,7 @@ function pack_message(o::AbstractLmcpMessage) return buffer.data[1:buffer.size] end -function validate(bytes::Vector{UInt8}) +function validate(bytes::AbstractVector{UInt8}) #retrieves the checksum value in BIG_ENDIAN order cs::UInt64 = 0 len = length(bytes) @@ -71,7 +71,7 @@ function unpack_message(buffer::IOBuffer) return read(messageBuffer, AbstractLmcpMessage) end -function unpack_message(bytes::Vector{UInt8}) +function unpack_message(bytes::AbstractVector{UInt8}) buffer = IOBuffer(bytes) return unpack_message(buffer) end @@ -81,7 +81,7 @@ function unpack_message(str::String) return unpack_message(buffer) end -function unpack_messages(bytes::Vector{UInt8}) +function unpack_messages(bytes::AbstractVector{UInt8}) buffer = IOBuffer(bytes) messages = Vector{LmcpBaseInterface}() while bytesavailable(buffer) > 0